[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #5 from rguenth at gcc dot gnu dot org 2010-09-02 11:24 --- Maybe a similar issue, but this one is after DOM where we have stuff like bb 7: # .MEM_8 = PHI .MEM_7(D)(2) # VUSE .MEM_5 j.0_12 = j; goto bb 6; after jump-threading supposedly, so indeed a quite similar case. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #6 from rguenth at gcc dot gnu dot org 2010-09-02 12:31 --- This fixes the 2nd testcase for me: Index: ipa-split.c === --- ipa-split.c (revision 163772) +++ ipa-split.c (working copy) @@ -993,8 +993,8 @@ split_function (struct split_point *spli { gimple stmt = gsi_stmt (gsi); gcc_assert (!is_gimple_reg (gimple_phi_result (stmt))); - mark_sym_for_renaming (SSA_NAME_VAR (PHI_RESULT (stmt))); - gsi_remove (gsi, false); + mark_virtual_phi_result_for_renaming (stmt); + remove_phi_node (gsi, true); } } /* When we pass aorund the value, use existing return block. */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #7 from rguenth at gcc dot gnu dot org 2010-09-02 12:34 --- And the first one. Mine. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2010-08-26 09:42:55 |2010-09-02 12:34:55 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #8 from rguenth at gcc dot gnu dot org 2010-09-02 13:42 --- Subject: Bug 45412 Author: rguenth Date: Thu Sep 2 13:42:25 2010 New Revision: 163775 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163775 Log: 2010-09-02 Richard Guenther rguent...@suse.de PR tree-optimization/44937 PR tree-optimization/45412 * ipa-split.c (split_function): Properly remove PHI nodes. * g++.dg/opt/pr45412.C: New testcase. * gcc.c-torture/compile/pr45412.c: Likewise. * gcc.c-torture/compile/pr44937.c: Likewise. Added: trunk/gcc/testsuite/g++.dg/opt/pr45412.C trunk/gcc/testsuite/gcc.c-torture/compile/pr44937.c trunk/gcc/testsuite/gcc.c-torture/compile/pr45412.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-split.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #9 from rguenth at gcc dot gnu dot org 2010-09-02 13:43 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #4 from zsojka at seznam dot cz 2010-08-31 19:07 --- Created an attachment (id=21612) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21612action=view) different testcase, probably better This one needs only -O2 to reproduce: $ valgrind -q --trace-children=yes gcc -O2 pr45412-2.c ... ==32673== Invalid read of size 8 ==32673==at 0x8F1D95: update_ssa (tree-flow-inline.h:479) ==32673==by 0x7BDA67: execute_function_todo (passes.c:1206) ==32673==by 0x7BE07E: execute_todo (passes.c:1283) ==32673==by 0x7C0739: execute_one_pass (passes.c:1591) ==32673==by 0x7C0964: execute_pass_list (passes.c:1623) ==32673==by 0x7C0976: execute_pass_list (passes.c:1624) ==32673==by 0x903E45: tree_rest_of_compilation (tree-optimize.c:452) ==32673==by 0xAC0C05: cgraph_expand_function (cgraphunit.c:1469) ==32673==by 0xAC3609: cgraph_optimize (cgraphunit.c:1548) ==32673==by 0xAC3B59: cgraph_finalize_compilation_unit (cgraphunit.c:1012) ==32673==by 0x4E0E4E: c_write_global_declarations (c-decl.c:9735) ==32673==by 0x8ABAD4: toplev_main (toplev.c:983) ==32673== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==32673== pr45412-2.c: In function 'bar': pr45412-2.c:6:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #1 from zsojka at seznam dot cz 2010-08-26 09:04 --- Created an attachment (id=21569) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21569action=view) reduced testcase $ g++ -O2 -fipa-cp-clone -ftracer pr45412.C -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-08-26 09:42 --- Confirmed. The tracer seriously messes up virtual operands. I'm not sure the copy tables work like the author thought they would. After duplicating we have virtual int S::vm() (struct S * const this) { int state; int D.2129; int retval.0; bb 2: # .MEM_8 = VDEF .MEM_7(D) retval.0_1 = foo (state); switch (retval.0_1) default: L3, case 0: L0, case 1: L1 L0: # .MEM_9 = VDEF .MEM_8 bar (); bb 7: # .MEM_14 = PHI .MEM_9(3) if (this_3(D) != 0B) goto bb 8; else goto bb 6 (L3); bb 8: # .MEM_15 = VDEF .MEM_5 S::~S (this_3(D)); # .MEM_16 = VDEF .MEM_12 operator delete (this_3(D)); bb 9: # .MEM_17 = PHI .MEM_13(8) # VUSE .MEM_10 D.2129_18 = state; return D.2129_4; # .MEM_5 = PHI .MEM_8(2) L1: if (this_3(D) != 0B) goto bb 5; else goto bb 6 (L3); bb 5: # .MEM_12 = VDEF .MEM_5 S::~S (this_3(D)); # .MEM_13 = VDEF .MEM_12 operator delete (this_3(D)); # .MEM_10 = PHI .MEM_8(2), .MEM_5(4), .MEM_13(5), .MEM_5(7) L3: # VUSE .MEM_10 D.2129_4 = state; return D.2129_4; } see how virtual SSA form is messed up (and no symbol is marked for renaming). -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-08-26 09:42:55 date|| Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer
--- Comment #3 from hjl dot tools at gmail dot com 2010-08-26 14:16 --- It is caused by revision 162842: http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00053.html -- hjl dot tools at gmail dot com changed: What|Removed |Added CC||hubicka at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412