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.
Created attachment 19358 [details] Preprocessed C++ source triggering this ICE
It is caused by revision 151696: http://gcc.gnu.org/ml/gcc-cvs/2009-09/msg00443.html
Could someone confirm that this is a 4.5 ICE regression and tag it as such? Happy holidays!
Confirmed on 4.5. The ICE happens only with -O2, with checking enabled. I think this should be flagged as P1.
Sorry for the probably uninformed question, but this bug was just tagged "enhancement", and I thought that "enhancement" meant "not really a bug but rather a feature request". I would like to understand?
(In reply to comment #5) > Sorry for the probably uninformed question, but this bug was just tagged > "enhancement", and I thought that "enhancement" meant "not really a bug but > rather a feature request". I would like to understand? I think it was an accident as this is a P1 bug anyways.
Subject: Re: [4.5 Regression] another GCC 4.5 ICE on C++ templated code > I think it was an accident as this is a P1 bug anyways. That was accident (i meant to update different PR). I tought I fixed that already. Honza
Created attachment 19938 [details] smaller testcase Here is the smallest testcase I could get out of delta.
(In reply to comment #8) > Created an attachment (id=19938) [edit] > smaller testcase > > Here is the smallest testcase I could get out of delta. I have a testcase of only 8K but delta is still running. I think I should be able to reduce it to less than 228 lines.
Created attachment 20015 [details] further reduced testcase This testcase is somehow smaller. I won't try to reduce it further.
Created attachment 20016 [details] different reduced testcase Testcases from comment #0 and comment #10 don't fail for me (x86_64, r157161). However, attached testcase does (further reduced from comment #8). Compiler flags: -O3 ; -O2 ; -O1 -fipa-cp -fipa-sra
*** Bug 43198 has been marked as a duplicate of this bug. ***
I have a patch for this. I will submit it tomorrow.
(In reply to comment #13) > I have a patch for this. I will submit it tomorrow. > Unfortunately, I am not sure that my patch really fixes the issue rather than hides it. I'd like to discuss it with Honza first. Nevertheless, I'll keep working on this.
I came to the conclusion the patch was indeed a good fix. I have submitted it to the mailing list along with an explanation of what is going on: http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00270.html
Re-assigning to Martin then.
Subject: Bug 42450 Author: jamborm Date: Thu Mar 18 20:07:13 2010 New Revision: 157546 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157546 Log: 2010-03-18 Martin Jambor <mjambor@suse.cz> PR middle-end/42450 * cgraph.h (cgraph_redirect_edge_call_stmt_to_callee): Declare. * cgraphunit.c (cgraph_materialize_all_clones): Update calls in all non-clones. Moved call redirection... (cgraph_redirect_edge_call_stmt_to_callee): ...to this new function. (cgraph_materialize_all_clones): Dispose of all combined_args_to_skip bitmaps. (verify_cgraph_node): Do not check for edges pointing to wrong nodes in inline clones. * tree-inline.c (copy_bb): Call cgraph_redirect_edge_call_stmt_to_callee. * ipa.c (cgraph_remove_unreachable_nodes): Call cgraph_node_remove_callees even when there are used clones. * testsuite/g++.dg/torture/pr42450.C: New test. Added: trunk/gcc/testsuite/g++.dg/torture/pr42450.C Modified: trunk/gcc/ChangeLog trunk/gcc/cgraph.h trunk/gcc/cgraphunit.c trunk/gcc/ipa.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-inline.c
Fixed.
Subject: Bug 42450 Author: hjl Date: Thu Mar 25 16:39:51 2010 New Revision: 157726 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157726 Log: Backport regression testcases from mainline. 2010-03-25 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2010-03-22 Jason Merrill <jason@redhat.com> PR c++/43333 * g++.dg/ext/is_pod_98.C: New. 2010-03-22 Michael Matz <matz@suse.de> PR middle-end/43475 * gfortran.dg/pr43475.f90: New testcase. 2010-03-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/43390 * gfortran.fortran-torture/execute/pr43390.f90: New testcase. 2010-03-20 Dodji Seketeli <dodji@redhat.com> PR c++/43375 * g++.dg/abi/mangle42.C: New test. 2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com> PR C/43211 * gcc.dg/pr43211.c: New test. 2010-03-18 Martin Jambor <mjambor@suse.cz> PR middle-end/42450 * g++.dg/torture/pr42450.C: New test. 2010-03-18 Michael Matz <matz@suse.de> PR tree-optimization/43402 * gcc.dg/pr43402.c: New testcase. 2010-03-17 Peter Bergner <bergner@vnet.ibm.com> PR target/42427 * gcc.dg/pr42427.c: New test. 2010-03-16 Richard Guenther <rguenther@suse.de> PR middle-end/43379 * gcc.dg/pr43379.c: New testcase. 2010-03-15 Michael Matz <matz@suse.de> PR middle-end/43300 * gcc.dg/pr43300.c: New testcase. 2010-03-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/43367 * gcc.c-torture/compile/pr43367.c: New testcase. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/abi/mangle42.C - copied unchanged from r157725, trunk/gcc/testsuite/g++.dg/abi/mangle42.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ext/is_pod_98.C - copied unchanged from r157725, trunk/gcc/testsuite/g++.dg/ext/is_pod_98.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr42450.C - copied unchanged from r157725, trunk/gcc/testsuite/g++.dg/torture/pr42450.C branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43367.c - copied unchanged from r157725, trunk/gcc/testsuite/gcc.c-torture/compile/pr43367.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr42427.c - copied unchanged from r157725, trunk/gcc/testsuite/gcc.dg/pr42427.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43211.c - copied unchanged from r157725, trunk/gcc/testsuite/gcc.dg/pr43211.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43300.c - copied unchanged from r157725, trunk/gcc/testsuite/gcc.dg/pr43300.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43379.c - copied unchanged from r157725, trunk/gcc/testsuite/gcc.dg/pr43379.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43402.c - copied unchanged from r157725, trunk/gcc/testsuite/gcc.dg/pr43402.c branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr43475.f90 - copied unchanged from r157725, trunk/gcc/testsuite/gfortran.dg/pr43475.f90 branches/gcc-4_4-branch/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90 - copied unchanged from r157725, trunk/gcc/testsuite/gfortran.fortran-torture/execute/pr43390.f90 Modified: branches/gcc-4_4-branch/gcc/testsuite/ChangeLog