Test eon from SPEC CPU2000 fails to build on powerpc64-linux with both -m32 and -m64 and "-fnon-call-exceptions -ffast-math -fno-gcse " with an ICE in calc_dfs_tree at dominance.c:393 Minimized test case: class One { public: One () { e[0] = e[1] = 0.0; } double e[2]; }; template <class T> class Two { public: Two(); private: T *data; int arraySize; }; template <class T> Two<T>::Two() { data = new T[arraySize]; } class Three { protected: Two<One> data; }; class Four : public Three { public: Four (); void Foo (int n); }; Four :: Four (){ Foo (1); } The ICE starts with: http://gcc.gnu.org/viewcvs?view=rev&rev=123084 r123084 | bonzini | 2007-03-20 08:31:13 +0000 (Tue, 20 Mar 2007)
Interesting combination of options (-O2 is missing though).
Investigating.
The option list should have included -O2. This is one of the failures found by compiling SPEC CPU2000 with lots of sets of options and running with the test input, as described in http://gcc.gnu.org/ml/gcc/2007-09/msg00496.html.
> The option list should have included -O2. This is one of the failures found > compiling SPEC CPU2000 with lots of sets of options and running with the test > input, as described in http://gcc.gnu.org/ml/gcc/2007-09/msg00496.html. OK, thanks for explaining again. :-)
Subject: Bug 34035 Author: ebotcazou Date: Mon Nov 12 21:21:37 2007 New Revision: 130122 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130122 Log: PR rtl-optimization/34035 * cse.c (cse_cfg_altered): New global variable. (cse_jumps_altered): Make boolean. (recorded_label_ref): Likewise. (cse_insn): Adjust for above changes. (cse_extended_basic_block): Likewise. Set cse_cfg_altered if dead edges have been purged. (cse_main): Change return value specification and adjust code. (rest_of_handle_cse): Adjust for above change. (rest_of_handle_cse2): Likewise. * gcse.c (rest_of_handle_gcse): Likewise. Added: trunk/gcc/testsuite/g++.dg/opt/cfg5.C Modified: trunk/gcc/ChangeLog trunk/gcc/cse.c trunk/gcc/gcse.c trunk/gcc/testsuite/ChangeLog
This should work now.
The fix increases compile time, please reconsider.
The bug is nevertheless fixed.