This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 21004 - internal error with -O
internal error with -O
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: 2000-11-17 05:54 EST by Dimitri Papadopoulos
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-17 05:56:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Dimitri Papadopoulos 2000-11-17 05:54:55 EST
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 05:56:38 EST
Created attachment 5483 [details]
C++ source file to reproduce the bug. Compile with -O1 or better.
Comment 2 Jakub Jelinek 2000-11-17 06:03:44 EST
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.