When the attached code is compiled with g++ -finline -DBOUNDS_CHECK -c ion_recomb_Badnell.ii you get /usr/local/gcc430/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h: In member function ‘T& n_pointer<T, d, 1, ARPA_TYPE, true>::operator[](size_t) const [with T = t_quantumState, int d = 3]’: /usr/local/gcc430/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h:494: internal compiler error: in expand_call_inline, at tree-inline.c:2653 Please submit a full bug report, .... g++ -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc430/configure --prefix=/usr/local/gcc430 --enable-languages=c,c++,fortran Thread model: posix gcc version 4.3.0 20080201 (experimental) (GCC) I could reproduce the bug on i686-pc-linux-gnu as well. I only got it with g++ 4.3.0, not with 4.2.2, 4.1.2, or 4.0.4. PS - My apologies for the large test case. I tried to reduce it, but got totally frustrated because removing code almost invariably made the bug go away.
Created attachment 15124 [details] test case that fails
Created attachment 15126 [details] slightly reduced testcase This is what multidelta gets me (see <http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction>). Sorry, I don't have time for manual reduction ATM.
Created attachment 15127 [details] fix mime type of gzipped testcase
Created attachment 15128 [details] slightly more reduced testcase
I can confirm the ICE on i686 with -m64 (the reduced testcase doesn't fail with -m32 on i686 for me). Adding any optimization flag makes the ICE go away (thus, non-SSA inlining ICEs). /* We have missing edge in the callgraph. This can happen in one case where previous inlining turned indirect call into direct call by constant propagating arguments. In all other cases we hit a bug (incorrect node sharing is most common reason for missing edges. */ gcc_assert (dest->needed || !flag_unit_at_a_time); more reduction is necessary here. I also think this is a minor issue due to the fact it only triggers at -O0 with inlining. Works for me with 4.2.3.
I am looking into it. Obviously cgraph is out of sync for whatever reason. Honza
This one liner actually took me a while. It is quite ugly ordering issue. Index: ipa.c =================================================================== --- ipa.c (revision 132243) +++ ipa.c (working copy) @@ -192,6 +192,7 @@ cgraph_remove_unreachable_nodes (bool be } cgraph_node_remove_callees (node); node->analyzed = false; + node->local.inlinable = false; } else cgraph_remove_node (node);
Subject: Re: [4.3 Regression] ICE: in expand_call_inline, at tree-inline.c:2653 * hubicka at gcc dot gnu dot org wrote on Wed, Feb 13, 2008 at 06:29:51PM CET: > ------- Comment #7 from hubicka at gcc dot gnu dot org 2008-02-13 17:29 ------- > This one liner actually took me a while. It is quite ugly ordering issue. > Index: ipa.c > =================================================================== > --- ipa.c (revision 132243) > +++ ipa.c (working copy) > @@ -192,6 +192,7 @@ cgraph_remove_unreachable_nodes (bool be > } > cgraph_node_remove_callees (node); > node->analyzed = false; > + node->local.inlinable = false; > } > else > cgraph_remove_node (node); This patch fixes the failure for me. Thanks for working on it!
Fixed by my patch.
Subject: Bug 35149 Author: hubicka Date: Fri Feb 15 11:15:48 2008 New Revision: 132337 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132337 Log: PR middle-end/35149 * ipa.c (cgraph_remove_unreachable_nodes): Clear local.inlinable flag. Modified: trunk/gcc/ChangeLog trunk/gcc/ipa.c