This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51136] [4.7 Regression] ICE: SIGSEGV in unlink_virtual_phi (tree-flow-inline.h:427) with -O2 -fno-tree-dominator-opts (-ftree-tail-merge)
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Nov 2011 14:00:44 +0000
- Subject: [Bug tree-optimization/51136] [4.7 Regression] ICE: SIGSEGV in unlink_virtual_phi (tree-flow-inline.h:427) with -O2 -fno-tree-dominator-opts (-ftree-tail-merge)
- Auto-submitted: auto-generated
- References: <bug-51136-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51136
--- Comment #1 from vries at gcc dot gnu.org 2011-11-15 14:00:44 UTC ---
Created attachment 25827
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25827
tentative patch
The problem is that in update_vuses, we're removing the def of the
def-use-chain we're walking with
FOR_EACH_IMM_USE_STMT/FOR_EACH_IMM_USE_ON_STMT.
Postponing the removal till after we've walked all the uses fixes the problem.