Hi, Thanks to bug #42225 being now fixed, I was able to continue the build of Eigen's unit tests, and I hit another ICE. It's probably the last one though, as it occurred at 97% into the build process.
Attached file autodiff.ii.bz2 allows to reproduce it. To reproduce it: bunzip2 autodiff.ii.bz2 g++-svn autodiff.ii Here the errors happens with GCC SVN from today, December 21. The same .ii file compiles nicely with GCC 4.4. My platform is Linux x86-64. Below is the compiler output when I generated the .ii file: ##### 13:46:13 ~/build/eigen/unsupported/test$ /usr/local/bin/g++-svn -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/unsupported/test -I/home/bjacob/eigen/unsupported/test -I/home/bjacob/eigen -I/home/bjacob/build/eigen -I/home/bjacob/eigen/unsupported/test/../../test -DEIGEN_TEST_FUNC=autodiff -o CMakeFiles/autodiff.dir/autodiff.cpp.o -c /home/bjacob/eigen/unsupported/test/autodiff.cpp -save-temps -v Using built-in specs. COLLECT_GCC=/usr/local/bin/g++-svn COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../repo/configure --prefix=/usr/local --program-suffix=-svn --disable-multilib --enable-threads=posix --enable-maintainer-mode --enable-gnu-unique-object --with-lto CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe' LDFLAGS='-Wl,--hash-style=gnu -Wl,--as-needed' CXXFLAGS='-march=x86-64 -mtune=generic -O2 -pipe' --enable-languages=c,c++,lto --no-create --no-recursion Thread model: posix gcc version 4.5.0 20091221 (experimental) (GCC) COLLECT_GCC_OPTIONS='-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/unsupported/test' '-I/home/bjacob/eigen/unsupported/test' '-I/home/bjacob/eigen' '-I/home/bjacob/build/eigen' '-I/home/bjacob/eigen/unsupported/test/../../test' '-DEIGEN_TEST_FUNC=autodiff' '-o' 'CMakeFiles/autodiff.dir/autodiff.cpp.o' '-c' '-save-temps' '-v' '-shared-libgcc' '-mtune=generic' /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus -E -quiet -v -I/home/bjacob/build/eigen/unsupported/test -I/home/bjacob/eigen/unsupported/test -I/home/bjacob/eigen -I/home/bjacob/build/eigen -I/home/bjacob/eigen/unsupported/test/../../test -D_GNU_SOURCE -DEIGEN_TEST_FUNC=autodiff /home/bjacob/eigen/unsupported/test/autodiff.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 autodiff.ii ignoring nonexistent directory "/usr/local/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/unsupported/test /home/bjacob/eigen/unsupported/test /home/bjacob/eigen /home/bjacob/build/eigen /home/bjacob/eigen/unsupported/test/../../test /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/x86_64-unknown-linux-gnu /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/backward /usr/local/include /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include-fixed /usr/include End of search list. COLLECT_GCC_OPTIONS='-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/unsupported/test' '-I/home/bjacob/eigen/unsupported/test' '-I/home/bjacob/eigen' '-I/home/bjacob/build/eigen' '-I/home/bjacob/eigen/unsupported/test/../../test' '-DEIGEN_TEST_FUNC=autodiff' '-o' 'CMakeFiles/autodiff.dir/autodiff.cpp.o' '-c' '-save-temps' '-v' '-shared-libgcc' '-mtune=generic' /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus -fpreprocessed autodiff.ii -quiet -dumpbase autodiff.cpp -mtune=generic -ansi -auxbase-strip CMakeFiles/autodiff.dir/autodiff.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 autodiff.s GNU C++ (GCC) version 4.5.0 20091221 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.5.0 20091221 (experimental), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU C++ (GCC) version 4.5.0 20091221 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.5.0 20091221 (experimental), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 2917576661493d8848576b1c267a2e70 /home/bjacob/eigen/unsupported/test/autodiff.cpp:163:1: error: edge points to wrong declaration: <function_decl 0x7fc4c4e6fb00 _ZNSdD2Ev.clone.5 type <method_type 0x7fc4c6790930 type <void_type 0x7fc4d02dfe70 void type_6 VOID align 8 symtab 0 alias set -1 canonical type 0x7fc4d02dfe70 pointer_to_this <pointer_type 0x7fc4d02dff18>> QI size <integer_cst 0x7fc4d02ca758 constant 8> unit size <integer_cst 0x7fc4d02ca780 constant 1> align 8 symtab 0 alias set -1 canonical type 0x7fc4cc672d20 method basetype <record_type 0x7fc4cdb79d20 basic_iostream> arg-types <tree_list 0x7fc4c74cff28 value <pointer_type 0x7fc4cc672738> chain <tree_list 0x7fc4d02ef5a0 value <void_type 0x7fc4d02dfe70 void>>> pointer_to_this <pointer_type 0x7fc4c97f8690>> addressable used nothrow static in_system_header autoinline decl_5 QI defer-output file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 7 align 16 context <record_type 0x7fc4cdb79d20 basic_iostream> initial <block 0x7fc4c402a580> abstract_origin <function_decl 0x7fc4cc670a00 basic_iostream> arguments <parm_decl 0x7fc4c63114c8 this type <pointer_type 0x7fc4cc672888 type <record_type 0x7fc4cdb79d20 basic_iostream> readonly unsigned DI size <integer_cst 0x7fc4d02caa50 constant 64> unit size <integer_cst 0x7fc4d02caa78 constant 8> align 64 symtab 0 alias set -1 canonical type 0x7fc4cc672888> readonly used unsigned DI file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 23 size <integer_cst 0x7fc4d02caa50 64> unit size <integer_cst 0x7fc4d02caa78 8> align 64 context <function_decl 0x7fc4c4e6fb00 _ZNSdD2Ev.clone.5> abstract_origin <parm_decl 0x7fc4cc671990 this> arg-type <pointer_type 0x7fc4cc672888>> result <result_decl 0x7fc4c5a93200 D.285724 type <void_type 0x7fc4d02dfe70 void> used ignored VOID file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 27 align 8 context <function_decl 0x7fc4c4e6fb00 _ZNSdD2Ev.clone.5> abstract_origin <result_decl 0x7fc4c7299180 D.201266>> full-name "std::basic_iostream<_CharT, _Traits>::~basic_iostream() [with _CharT = char, _Traits = std::char_traits<char>]" pending-inline-info 0x7fc4c7292540 template-info 0x7fc4cc674040 struct-function 0x7fc4c5b573f0> Instead of: <function_decl 0x7fc4cc677100 __base_dtor type <method_type 0x7fc4cc672d20 type <void_type 0x7fc4d02dfe70 void type_6 VOID align 8 symtab 0 alias set -1 canonical type 0x7fc4d02dfe70 pointer_to_this <pointer_type 0x7fc4d02dff18>> QI size <integer_cst 0x7fc4d02ca758 constant 8> unit size <integer_cst 0x7fc4d02ca780 constant 1> align 8 symtab 0 alias set -1 canonical type 0x7fc4cc672d20 method basetype <record_type 0x7fc4cdb79d20 basic_iostream> arg-types <tree_list 0x7fc4cc675280 value <pointer_type 0x7fc4cc672738> chain <tree_list 0x7fc4cd1f3258 value <pointer_type 0x7fc4cd948b28> chain <tree_list 0x7fc4d02ef5a0 value <void_type 0x7fc4d02dfe70 void>>>> pointer_to_this <pointer_type 0x7fc4c97f8690>> addressable used nothrow public static external in_system_header autoinline decl_5 QI defer-output file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 7 align 16 context <record_type 0x7fc4cdb79d20 basic_iostream> initial <error_mark 0x7fc4d02d2d08> abstract_origin <function_decl 0x7fc4cc670a00 basic_iostream> arguments <parm_decl 0x7fc4cc676770 this type <pointer_type 0x7fc4cc672888 type <record_type 0x7fc4cdb79d20 basic_iostream> readonly unsigned DI size <integer_cst 0x7fc4d02caa50 constant 64> unit size <integer_cst 0x7fc4d02caa78 constant 8> align 64 symtab 0 alias set -1 canonical type 0x7fc4cc672888> readonly unsigned DI file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 23 size <integer_cst 0x7fc4d02caa50 64> unit size <integer_cst 0x7fc4d02caa78 8> align 64 context <function_decl 0x7fc4cc677100 __base_dtor > abstract_origin <parm_decl 0x7fc4cc671990 this> arg-type <pointer_type 0x7fc4cc672888> chain <parm_decl 0x7fc4cc676880 __vtt_parm type <pointer_type 0x7fc4cd948b28> readonly unsigned DI file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 7 size <integer_cst 0x7fc4d02caa50 64> unit size <integer_cst 0x7fc4d02caa78 8> align 64 context <function_decl 0x7fc4cc677100 __base_dtor > abstract_origin <parm_decl 0x7fc4cc671a18 __vtt_parm> arg-type <pointer_type 0x7fc4cd948b28>>> result <result_decl 0x7fc4c7299180 D.201266 type <void_type 0x7fc4d02dfe70 void> ignored VOID file /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 27 align 8 context <function_decl 0x7fc4cc677100 __base_dtor >> full-name "std::basic_iostream<_CharT, _Traits>::~basic_iostream() [with _CharT = char, _Traits = std::char_traits<char>]" pending-inline-info 0x7fc4c7292540 template-info 0x7fc4cc674040 chain <function_decl 0x7fc4cc677000 __comp_dtor >> std::basic_stringstream<_CharT, _Traits, _Alloc>::~basic_stringstream() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]/3411(-1) @0x7fc4c6b0bea0 (inline copy in std::ostream& Eigen::ei_print_matrix(std::ostream&, const Derived&, const Eigen::IOFormat&) [with Derived = Eigen::Matrix<float, 1, 2, 1>, std::ostream = std::basic_ostream<char>]/1583) (clone of std::basic_stringstream<_CharT, _Traits, _Alloc>::~basic_stringstream() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]/1943) availability:available 41 time, 14 benefit (54 after inlining) 14 size, 5 benefit (18 after inlining) reachable body finalized inlinable called by: std::ostream& Eigen::ei_print_matrix(std::ostream&, const Derived&, const Eigen::IOFormat&) [with Derived = Eigen::Matrix<float, 1, 2, 1>, std::ostream = std::basic_ostream<char>]/1583 (0.50 per call) (inlined) (can throw external) calls: std::basic_stringbuf<char>::~basic_stringbuf()/4131 (inlined) (0.50 per call) (nested in 2 loops) std::basic_iostream<_CharT, _Traits>::~basic_iostream() [with _CharT = char, _Traits = std::char_traits<char>]/6408 (0.50 per call) (nested in 2 loops) std::ios_base::~ios_base()/6413 (0.50 per call) (nested in 2 loops) (can throw external) /home/bjacob/eigen/unsupported/test/autodiff.cpp:163:1: internal compiler error: verify_cgraph_node failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: another GCC 4.5 ICE 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=42450