Bug 966326 - internal compiler error: Segmentation fault
internal compiler error: Segmentation fault
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc (Show other bugs)
6.6
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-23 00:50 EDT by Amir Shenavandeh
Modified: 2013-07-18 18:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-18 18:45:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Preprocessed source (475.68 KB, text/plain)
2013-05-23 00:50 EDT, Amir Shenavandeh
no flags Details

  None (edit)
Description Amir Shenavandeh 2013-05-23 00:50:49 EDT
Created attachment 751987 [details]
Preprocessed source

Description of problem:

Trying to compile a C++ code, ended up a segmentation fault.

Version-Release number of selected component (if applicable):
]$ g++ -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)


How reproducible:
Try compiling the attached code with the following options:
#g++ ./CException.cc -c -o CException.o


Sources are as fallows:
##############################################
##CException.h

#include <string>
#include <iostream>
#include <exception>
using namespace std;

class CException: public exception
{
        private:
                string expList[2];

                unsigned int value;
        public:
                CException() throw();
                CException(unsigned int e) throw ();
                ~CException() throw();
                string getMessage();
                unsigned int getValue();
};
##############################################
##CException.cc
#include "CException.h"

CException::CException() throw() {
        expList = {
                        "Generic Exception.",
                        "Index out of range."
                };

        value=0;
}

CException::CException(int e) throw() {
        CException::CException();
        value = e;
}

CException::~CException() throw() {
        ~exception();
}

string CException::getMessage() {
        return expList[value];
}

unsigned int CException::getValue() {
        return value;
}


Steps to Reproduce:
1. Compile the code.
2.
3.

Actual results:
./CException.cc: In constructor ‘CException::CException()’:
./CException.cc:7: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
./CException.cc:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccEFV7Y3.out file, please attach this to your bugreport.

Expected results:
Some errors and warnings. Not a Segmentation Fault

Additional info:
Comment 2 Jakub Jelinek 2013-07-18 18:34:06 EDT
For C++11 code, please use a compiler with better C++11 support, i.e. best gcc 4.7.x from Developer Toolset 1.1 or gcc 4.8.x from Developer Toolset 2.0 (beta right now).
Comment 3 RHEL Product and Program Management 2013-07-18 18:45:18 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

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