Bug 152118 - g++ ICE Segmentation fault when compiling ArX-2.2.1
g++ ICE Segmentation fault when compiling ArX-2.2.1
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-24 18:38 EST by Klaus Pedersen
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-25 04:37:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Klaus Pedersen 2005-03-24 18:38:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1 Fedora/1.0.1-5

Description of problem:
gcc 4.0 fails to compile ArX-2.2.1. The following example which was extracted from a very large preprocessed file (original ArX: build/arx/utility_functions/Parsed_Name.cpp) demonstrates the problem:

..............
template<class T>
struct save_enum_type
{
    static void invoke(const T &t){
        const int i = static_cast<int>(t);
    }
};
..............

Compile with :  g++ -c -Wall -O3 bug.cpp
Results in :

bug.cpp: In static member function 'static void save_enum_type<T>::invoke(const T&)':
bug.cpp:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccIewRts.out file, please attach this to your bugreport.




Version-Release number of selected component (if applicable):
gcc-4.0.0-0.32

How reproducible:
Always

Steps to Reproduce:
1. cat > bug.cpp

template<class T>
struct save_enum_type
{
    static void invoke(const T &t){
        const int i = static_cast<int>(t);
    }
};
^d

2. g++ -c -Wall -O3 bug.cpp 

  

Actual Results:  bug.cpp: In static member function 'static void save_enum_type<T>::invoke(const T&)':
bug.cpp:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccIewRts.out file, please attach this to your bugreport.


Expected Results:  ArX could compile?!

Additional info:

You have to update the bondage:

ArX-2.2.1/src/boost/boost/config/compiler/gcc.hpp
87,88c87,88
< // last known and checked version is 4.0:
< #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 1))
---
> // last known and checked version is 3.4:
> #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 4))
Comment 1 Jakub Jelinek 2005-03-25 04:37:42 EST
Can't reproduce with gcc-c++-4.0.0-0.34 nor -0.37.

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