Bug 21004 - internal error with -O
Summary: internal error with -O
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-17 10:54 UTC by Dimitri Papadopoulos
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-17 10:56:40 UTC
Embargoed:


Attachments (Terms of Use)
C++ source file to reproduce the bug. Compile with -O1 or better. (642 bytes, text/plain)
2000-11-17 10:56 UTC, Dimitri Papadopoulos
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2000:132 0 normal SHIPPED_LIVE Bug fixing update of GCC 2.96 2000-12-19 05:00:00 UTC

Description Dimitri Papadopoulos 2000-11-17 10:54:55 UTC
Hi,

Compile this program with -O1 or better. You'll get a compiler internal
error.


#include <set>

class BugGCC {
public:
  // if the constructor is defined outside of the class declaration:
  //    g++: Internal error: Segmentation fault (cc1plus)
  BugGCC( const set<int>& aset = set<int>() );
  // if the constructor is defined inline:
  //    no error
  // BugGCC( const set<int>& aset = set<int>() ) : myset( aset ) { }

private:
  set<int> myset;
};

// if the constructor is defined outside of the class declaration:
//    g++: Internal error: Segmentation fault (cc1plus)
BugGCC::BugGCC( const set<int>& aset ) : myset( aset ) { }

int main() {
  BugGCC abug;
}

Comment 1 Dimitri Papadopoulos 2000-11-17 10:56:38 UTC
Created attachment 5483 [details]
C++ source file to reproduce the bug. Compile with -O1 or better.

Comment 2 Jakub Jelinek 2000-11-17 11:03:44 UTC
Fixed in gcc-c++-2.96-61 and above (in rawhide is ATM I think -63).


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