Bug 49460 - [4.5 Regression] g++: Internal error: Segmentation fault (program cc1plus) using -O2 or -O3
Summary: [4.5 Regression] g++: Internal error: Segmentation fault (program cc1plus) us...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.3
: P2 normal
Target Milestone: 4.6.1
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 19:35 UTC by Roger Jarrett
Modified: 2012-07-02 10:06 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.4.6, 4.6.1
Known to fail: 4.5.0, 4.5.3
Last reconfirmed: 2011-06-20 10:42:56


Attachments
preprocessed source file SmartInliner.ii (gzipped) (319.61 KB, application/x-gunzip)
2011-06-17 19:41 UTC, Roger Jarrett
Details
autoreduced testcase (2.32 KB, text/plain)
2011-06-20 12:53 UTC, Richard Biener
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Jarrett 2011-06-17 19:35:57 UTC
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
Comment 1 Roger Jarrett 2011-06-17 19:41:29 UTC
Created attachment 24555 [details]
preprocessed source file SmartInliner.ii (gzipped)

preprocessed file gzipped to allow upload
Comment 2 Richard Biener 2011-06-20 10:42:56 UTC
Confirmed.  Other workaround: -fno-tree-pre.

We are endlessly translating {component_ref<fNextCell>,indirect_ref,D.126308_166}@.MEM_238
Comment 3 Richard Biener 2011-06-20 12:53:53 UTC
Created attachment 24565 [details]
autoreduced testcase
Comment 4 Roger Jarrett 2011-06-29 21:13:49 UTC
Confirmed  -fno-tree-pre worked around the issue using the  initial source 
--Roger
Comment 5 Richard Biener 2012-07-02 10:06:56 UTC
Fixed for 4.6.1.