public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42225]  New: GCC 4.5 ICE (segfault) on C++ templated code
@ 2009-11-30  4:14 jacob dot benoit dot 1 at gmail dot com
  2009-11-30  4:17 ` [Bug c++/42225] " jacob dot benoit dot 1 at gmail dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: jacob dot benoit dot 1 at gmail dot com @ 2009-11-30  4:14 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7698 bytes --]

Hi,

I ran into a ICE (segmentation fault) with GCC 4.5 (20091126) when building
some C++ templated code. The platform is GNU/Linux, x86-64.

Please find attached the preprocessed source:

   product_small.ii.bz2

I have compressed it because it was really huge (this codes uses a C++ template
library).

Below is the compiler output for the g++ that generated that .ii file. Scroll
to the end to see the ICE.


##### 22:58:34 ~/build/eigen/test$ /usr/bin/g++-4.5 -v -save-temps -DHAS_GSL
-DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -Wnon-virtual-dtor
-Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -Wformat-security -fexceptions -fno-check-new
-fno-common -fstrict-aliasing -Wextra -pedantic  -g2 -g0 -O2 
-fno-inline-functions -I/home/bjacob/build/eigen/test -I/home/bjacob/eigen/test
-I/home/bjacob/eigen -I/home/bjacob/build/eigen -I/usr/include/QtGui
-I/usr/include/QtCore    -DEIGEN_TEST_FUNC=product_small  -DEIGEN_TEST_PART_1=1
-o CMakeFiles/test_product_small_1.dir/product_small.cpp.o -c
/home/bjacob/eigen/test/product_small.cpp                                       
Using built-in specs.                                                           
COLLECT_GCC=/usr/bin/g++-4.5                                                    
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper     
Target: x86_64-unknown-linux-gnu                                                
Configured with: ../configure --prefix=/usr --enable-languages=c,c++
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-lto --enable-gnu-unique-object --disable-multilib
--disable-libstdcxx-pch --with-tune=generic --with-system-zlib --with-ppl
--with-cloog --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --disable-werror --enable-checking=release
--program-suffix=-4.5 --enable-version-specific-runtime-libs  
Thread model: posix                                                             
gcc version 4.5.0 20091126 (experimental) (GCC)                                 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-DHAS_GSL' '-DQT_DLL' '-DQT_GUI_LIB'
'-DQT_CORE_LIB' '-DQT_NO_DEBUG' '-Wnon-virtual-dtor' '-Wno-long-long' '-ansi'
'-Wundef' '-Wcast-align' '-Wchar-subscripts' '-Wall' '-W' '-Wpointer-arith'
'-Wwrite-strings' '-Wformat-security' '-fexceptions' '-fno-check-new'
'-fno-common' '-fstrict-aliasing' '-Wextra' '-pedantic' '-g2' '-g0' '-O2'
'-fno-inline-functions' '-I/home/bjacob/build/eigen/test'
'-I/home/bjacob/eigen/test' '-I/home/bjacob/eigen' '-I/home/bjacob/build/eigen'
'-I/usr/include/QtGui' '-I/usr/include/QtCore'
'-DEIGEN_TEST_FUNC=product_small' '-DEIGEN_TEST_PART_1=1' '-o'
'CMakeFiles/test_product_small_1.dir/product_small.cpp.o' '-c' '-shared-libgcc'
'-mtune=generic'                   
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus -E -quiet -v
-I/home/bjacob/build/eigen/test -I/home/bjacob/eigen/test -I/home/bjacob/eigen
-I/home/bjacob/build/eigen -I/usr/include/QtGui -I/usr/include/QtCore
-D_GNU_SOURCE -DHAS_GSL -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_DEBUG
-DEIGEN_TEST_FUNC=product_small -DEIGEN_TEST_PART_1=1
/home/bjacob/eigen/test/product_small.cpp -mtune=generic -ansi
-Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall
-W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -pedantic
-fexceptions -fno-check-new -fno-common -fstrict-aliasing -fno-inline-functions
-O2 -fpch-preprocess -o product_small.ii                                        
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/include" 
#include "..." search starts here:                                              
#include <...> search starts here:                                              
 /home/bjacob/build/eigen/test                                                  
 /home/bjacob/eigen/test                                                        
 /home/bjacob/eigen                                                             
 /home/bjacob/build/eigen                                                       
 /usr/include/QtGui                                                             
 /usr/include/QtCore                                                            
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include/c++                        

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include/c++/x86_64-unknown-linux-gnu 
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include/c++/backward               
 /usr/local/include                                                             
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include                            
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include-fixed                      
 /usr/include                                                                   
End of search list.                                                             
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-DHAS_GSL' '-DQT_DLL' '-DQT_GUI_LIB'
'-DQT_CORE_LIB' '-DQT_NO_DEBUG' '-Wnon-virtual-dtor' '-Wno-long-long' '-ansi'
'-Wundef' '-Wcast-align' '-Wchar-subscripts' '-Wall' '-W' '-Wpointer-arith'
'-Wwrite-strings' '-Wformat-security' '-fexceptions' '-fno-check-new'
'-fno-common' '-fstrict-aliasing' '-Wextra' '-pedantic' '-g2' '-g0' '-O2'
'-fno-inline-functions' '-I/home/bjacob/build/eigen/test'
'-I/home/bjacob/eigen/test' '-I/home/bjacob/eigen' '-I/home/bjacob/build/eigen'
'-I/usr/include/QtGui' '-I/usr/include/QtCore'
'-DEIGEN_TEST_FUNC=product_small' '-DEIGEN_TEST_PART_1=1' '-o'
'CMakeFiles/test_product_small_1.dir/product_small.cpp.o' '-c' '-shared-libgcc'
'-mtune=generic'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus -fpreprocessed
product_small.ii -quiet -dumpbase product_small.cpp -mtune=generic -ansi
-auxbase-strip CMakeFiles/test_product_small_1.dir/product_small.cpp.o -g2 -g0
-O2 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts
-Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -pedantic
-ansi -version -fexceptions -fno-check-new -fno-common -fstrict-aliasing
-fno-inline-functions -o product_small.s
GNU C++ (GCC) version 4.5.0 20091126 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091126 (experimental), GMP version
4.3.1, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.5.0 20091126 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091126 (experimental), GMP version
4.3.1, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: b74b35577b24604a564e27e0e25efd13
In file included from /home/bjacob/eigen/test/product_small.cpp:26:0:
/home/bjacob/eigen/test/product.h: In function ‘void product(const MatrixType&)
[with MatrixType = Eigen::Matrix<float, 3, 2, 0>]’:
/home/bjacob/eigen/test/product_small.cpp:31:97:   instantiated from here
/home/bjacob/eigen/test/product.h:45:60: internal compiler error: Segmentation
fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: GCC 4.5 ICE (segfault) on C++ templated code
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jacob dot benoit dot 1 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42225


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-12-22 18:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30  4:14 [Bug c++/42225] New: GCC 4.5 ICE (segfault) on C++ templated code jacob dot benoit dot 1 at gmail dot com
2009-11-30  4:17 ` [Bug c++/42225] " jacob dot benoit dot 1 at gmail dot com
2009-11-30 10:33 ` [Bug c++/42225] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-11-30 23:01 ` dodji at gcc dot gnu dot org
2009-12-01  0:26 ` dodji at gcc dot gnu dot org
2009-12-01  0:28 ` hjl dot tools at gmail dot com
2009-12-03 14:07 ` dodji at gcc dot gnu dot org
2009-12-11 14:36 ` dodji at gcc dot gnu dot org
2009-12-11 14:37 ` dodji at gcc dot gnu dot org
2009-12-11 17:07 ` jacob dot benoit dot 1 at gmail dot com
2009-12-11 17:11 ` jacob dot benoit dot 1 at gmail dot com
2009-12-11 17:24 ` hjl dot tools at gmail dot com
2009-12-11 22:12 ` dodji at gcc dot gnu dot org
2009-12-11 22:47 ` dodji at gcc dot gnu dot org
2009-12-11 22:51 ` jacob dot benoit dot 1 at gmail dot com
2009-12-11 23:39 ` hjl at gcc dot gnu dot org
2009-12-14  8:24 ` dodji at gcc dot gnu dot org
2009-12-14 12:43 ` jacob dot benoit dot 1 at gmail dot com
2009-12-14 13:03 ` rguenth at gcc dot gnu dot org
2009-12-19 22:41 ` dodji at gcc dot gnu dot org
2009-12-19 22:44 ` dodji at gcc dot gnu dot org
2009-12-21 18:59 ` jacob dot benoit dot 1 at gmail dot com
2009-12-22 18:18 ` hjl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).