Bug 48836 - internal compiler error: in execute_todo, at passes.c:1261
Summary: internal compiler error: in execute_todo, at passes.c:1261
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: mozillametabug
  Show dependency treegraph
 
Reported: 2011-04-30 16:16 UTC by Jan Hubicka
Modified: 2011-06-12 18:15 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase. (99.51 KB, application/x-gunzip)
2011-04-30 16:16 UTC, Jan Hubicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hubicka 2011-04-30 16:16:07 UTC
Created attachment 24152 [details]
testcase.

jh@evans:/abuild/jh/build-mozilla-new11-lto-noelfhackO3/extensions/spellcheck/src> /abuild/jh/trunk-install/bin/g++ -O3 ~/mozInlineSpellWordUtil.ii  -flto -fno-strict-aliasing  -S -g -fno-exceptions
/abuild/jh/mozilla-central2/mozilla-central/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp: In member function '_ZNK14WordSplitState17ClassifyCharacterEii.constprop.25':
/abuild/jh/mozilla-central2/mozilla-central/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp:863:1: internal compiler error: in execute_todo, at passes.c:1261
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Jan Hubicka 2011-04-30 16:32:30 UTC
The reason why we conclude updating is needed is redirecting of callees:
#0  0x00000000006abdd4 in bitmap_element_link (head=0x7ffff539b760, bit=Unhandled dwarf expression opcode 0xf3
) at ../../gcc/bitmap.c:431
#1  bitmap_set_bit (head=0x7ffff539b760, bit=Unhandled dwarf expression opcode 0xf3
) at ../../gcc/bitmap.c:653
#2  0x0000000000a7225a in finalize_ssa_defs (stmt=0x7ffff349a720) at ../../gcc/tree-ssa-operands.c:463
#3  finalize_ssa_stmt_operands (stmt=0x7ffff349a720) at ../../gcc/tree-ssa-operands.c:566
#4  build_ssa_operands (stmt=0x7ffff349a720) at ../../gcc/tree-ssa-operands.c:1078
#5  update_stmt_operands (stmt=0x7ffff349a720) at ../../gcc/tree-ssa-operands.c:1137
#6  0x0000000000b9fe63 in cgraph_redirect_edge_call_stmt_to_callee (e=0x7ffff30f1548) at ../../gcc/cgraphunit.c:2209
#7  0x0000000000bb47d3 in inline_transform (node=Unhandled dwarf expression opcode 0xf3
) at ../../gcc/ipa-inline-transform.c:305


We are probably right that update_ssa TODO should be dropped with aliasing on.

This patch fixes the problem, but I am not sure it is the best approach around.
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c      (revision 173216)
+++ ipa-inline-transform.c      (working copy)
@@ -45,6 +45,7 @@
 #include "ipa-prop.h"
 #include "ipa-inline.h"
 #include "tree-inline.h"
+#include "tree-pass.h"
 
 int ncalls_inlined;
 int nfunctions_inlined;
@@ -305,6 +306,9 @@
       cgraph_redirect_edge_call_stmt_to_callee (e);
       if (!e->inline_failed || warn_inline)
         inline_p = true;
+      /* Redirecting edges might lead to a need for vops to be recomputed.  */
+      if (need_ssa_update_p (cfun))
+       todo |= TODO_update_ssa_only_virtuals;
     }
 
   if (inline_p)
Comment 2 Richard Biener 2011-05-02 10:26:20 UTC
+      /* Redirecting edges might lead to a need for vops to be recomputed.  */
+      if (need_ssa_update_p (cfun))

you can omit that check, the updater won't do anything if there is nothing
to do.
Comment 3 Jan Hubicka 2011-05-02 11:37:22 UTC
> +      /* Redirecting edges might lead to a need for vops to be recomputed.  */
> +      if (need_ssa_update_p (cfun))
> 
> you can omit that check, the updater won't do anything if there is nothing
> to do.

Yep, I worked that out in meantime. So should I re-check with that change and commit?
Thanks,
Honza
Comment 4 Jan Hubicka 2011-06-12 18:08:55 UTC
Author: hubicka
Date: Sun Jun 12 18:08:52 2011
New Revision: 174970

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174970
Log:
	PR middle-end/48836
	* ipa-inline-transform.c: Include tree-pass.h
	(inline_transform): Set TODO_update_ssa_only_virtuals.
	* Makefile.in (ipa-inline-transform.o): Add tree-pass.h.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/ipa-inline-transform.c
Comment 5 Jan Hubicka 2011-06-12 18:15:04 UTC
Fixed.