Bug 23584 - g++ crash on conversion operator
g++ crash on conversion operator
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-08 11:44 EST by Need Real Name
Modified: 2007-04-18 12:30 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-01-08 11:44:22 EST
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 08:05:27 EST
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 10:28:39 EST
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 16:09:12 EST
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.