http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49460
Summary: g++: Internal error: Segmentation fault (program cc1plus) using -O2 or -O3 Product: gcc Version: 4.5.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: rjarr...@mathworks.com using GCC 4.5.3 one (and only one) file from our code base caused the compiler to Segfault. Set severity to normal because this only occurred in 1 file out of 10k+ and workaround is available. Workaround compile with -O1 or -O0 This issue does not occur when compiling with GCC4.4.5 or GCC 4.3.4 Version information: GNU C++ (GCC) version 4.5.3 (i686-pc-linux-gnu) compiled by GNU C version 4.5.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.5.3 (i686-pc-linux-gnu) compiled by GNU C version 4.5.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: caed1e0856fbbe32553e2b8828f0c55c g++: Internal error: Segmentation fault (program cc1plus) System type: Debian Linux 6.01 (glnx86 and glnxa64) GCC build/configuration options: (glnx86 build shown) gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/mathworks/hub/3rdparty/internal/290712/glnx86/gcc-4.5.3/bin/../libexec/gcc/i686-pc-linux-gnu/4.5.3/lto-wrapper Target: i686-pc-linux-gnu Configured with: /mathworks/devel/sandbox/greg/Amake.3p1/3p/sources/gcc-4.5/configure --prefix=/hub/3rdparty/internal/290712/glnx86/gcc-4.5.3 --with-gmp=/mathworks/devel/sandbox/greg/Amake.3p1/3p/derived/glnx86/gcc-4.5/gmp --with-mpfr=/mathworks/devel/sandbox/greg/Amake.3p1/3p/derived/glnx86/gcc-4.5/mpfr --with-mpc=/mathworks/devel/sandbox/greg/Amake.3p1/3p/derived/glnx86/gcc-4.5/mpc --enable-languages=c,c++,fortran --with-as=/hub/3rdparty/internal/290712/glnx86/gcc-4.5.3/bin/as --with-ld=/hub/3rdparty/internal/290712/glnx86/gcc-4.5.3/bin/ld Thread model: posix gcc version 4.5.3 (GCC) gcc version 4.4.5 (Debian 4.4.5-8) Compile line options/command line: COLLECT_GCC_OPTIONS='-c' '-o' '/tmp/SM.o' '-I../../src/cgir_xform/include' '-I../../src/include' '-I../../derived/glnx86/src/include' '-I../../src/cgir_xform' '-I../include' '-I../../include' '-I//mathworks/hub/3rdparty/R2012a/293758/glnx86/boost/include' '-I//mathworks/hub/3rdparty/R2012a/287824/glnx86/unique_ptr' '-I//mathworks/hub/3rdparty/R2012a/289443/glnx86/gmp/include' '-I//mathworks/hub/3rdparty/R2012a/288615/glnx86/mpfr/include' '-DMAKEHEADER_KEYWORDS' '-DMAKEHEADER_KEYWORDS' '-DNEEDS_MX_ERRWARN_MSG_ID_AND_TXT' '-DSL_INTERNAL' '-DCGIR_HANDWRITTEN_HEADERS' '-I../../simulink/include' '-DMODULE_CGIR' '-DBUILDING_CGIR_XFORM' '-O2' '-D_POSIX_C_SOURCE=199506L' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-v' '-save-temps' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro' /mathworks/hub/3rdparty/internal/290712/glnx86/gcc-4.5.3/bin/../libexec/gcc/i686-pc-linux-gnu/4.5.3/cc1plus -fpreprocessed SmartInliner.ii -quiet -dumpbase SmartInliner.cpp -mtune=generic -march=pentiumpro -auxbase-strip /tmp/SM.o -O2 -version -o SmartInliner.s --- SmartInliner.ii has attached to this file