Bug 23584 - g++ crash on conversion operator
Summary: g++ crash on conversion operator
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-08 16:44 UTC by Need Real Name
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-01 15:28:43 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Need Real Name 2001-01-08 16:44:22 UTC
The following code crashes g++.  If operator B is removed, g++ will no
longer crash.  The output is provided at the bottom.

--- BEGIN bug.cpp ---
struct A {
  typedef float (&B)[4][4];
  typedef const float (&C)[4][4];
 
  A() { }
  ~A() { }
 
  operator C() const;
  operator B();
};
 
void TestFunc()
{
  (A::C)A();
}                                                                               
--- END bug.cpp ---

--- begin output.txt ---
bug.cpp: In function `void TestFunc ()':
bug.cpp:14: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
--- END output.txt ---

Comment 1 Jakub Jelinek 2001-01-12 13:05:27 UTC
Reproduced with both gcc-c++-2.96-70 and current mainline CVS C++, will try
to debug this.

Comment 2 Jakub Jelinek 2001-02-01 15:28:39 UTC
I've just posted a patch for this to gcc-patches, waiting for approval.
http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00019.html

Comment 3 Jakub Jelinek 2001-02-05 21:09:12 UTC
The fix is in gcc-c++-2.96-74.


Note You need to log in before you can comment on or make changes to this bug.