[Bug c++/45709] [4.3/4.4 Regression] internal compiler error: in add_phi_arg, at tree-phinodes.c:395
--- Comment #11 from rguenth at gcc dot gnu dot org 2010-09-18 12:30 --- Stopping here for now - I guess doing immediate insertion still can break things as if there is another PHI node we'll iterate over the edges again (but now including split ones) and find_edge (new_edge-src-aux, bb) will break as new_edge-src is the newly inserted block. I suppose delaying edge insert commits until after at least this block is finished is better. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Known to work||4.5.2 4.6.0 Summary|[4.3/4.4/4.5/4.6 regression]|[4.3/4.4 Regression] |internal compiler error: in |internal compiler error: in |add_phi_arg, at tree- |add_phi_arg, at tree- |phinodes.c:395 |phinodes.c:395 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709
[Bug c++/45709] [4.3/4.4 Regression] internal compiler error: in add_phi_arg, at tree-phinodes.c:395
--- Comment #12 from rguenth at gcc dot gnu dot org 2010-09-18 12:42 --- Yep - testcase that still ICEs (now w/ a segfault): struct Region { int storage[4]; int count; }; static inline Region subtract(int lhs) { Region reg; int* storage = reg.storage; int* storage2 = reg.storage; if (lhs 0) storage++, storage2--; reg.count = storage - reg.storage + storage2 - reg.storage; return reg; } void bar(int a) { const Region copyBack(subtract(a)); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709
[Bug c++/45709] [4.3/4.4 Regression] internal compiler error: in add_phi_arg, at tree-phinodes.c:395
--- Comment #13 from rguenth at gcc dot gnu dot org 2010-09-18 12:54 --- new patch in testing. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709
[Bug c++/45709] [4.3/4.4 Regression] internal compiler error: in add_phi_arg, at tree-phinodes.c:395
--- Comment #14 from rguenth at gcc dot gnu dot org 2010-09-18 17:13 --- Subject: Bug 45709 Author: rguenth Date: Sat Sep 18 17:13:04 2010 New Revision: 164397 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164397 Log: 2010-09-18 Richard Guenther rguent...@suse.de PR tree-optimization/45709 * tree-inline.c (copy_phis_for_bb): Delay commit of edge insertions until after all PHI nodes of the block are processed. * g++.dg/torture/pr45709-2.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/torture/pr45709-2.C Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-inline.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709
[Bug c++/45709] [4.3/4.4 Regression] internal compiler error: in add_phi_arg, at tree-phinodes.c:395
--- Comment #15 from rguenth at gcc dot gnu dot org 2010-09-18 17:16 --- Subject: Bug 45709 Author: rguenth Date: Sat Sep 18 17:16:42 2010 New Revision: 164398 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164398 Log: 2010-09-18 Richard Guenther rguent...@suse.de PR tree-optimization/45709 * tree-inline.c (copy_phis_for_bb): Delay commit of edge insertions until after all PHI nodes of the block are processed. * g++.dg/torture/pr45709-2.C: New testcase. Added: branches/gcc-4_5-branch/gcc/testsuite/g++.dg/torture/pr45709-2.C Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/testsuite/ChangeLog branches/gcc-4_5-branch/gcc/tree-inline.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709
[Bug c++/45709] [4.3/4.4 Regression] internal compiler error: in add_phi_arg, at tree-phinodes.c:395
--- Comment #16 from rguenth at gcc dot gnu dot org 2010-09-18 17:23 --- Subject: Bug 45709 Author: rguenth Date: Sat Sep 18 17:23:20 2010 New Revision: 164399 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164399 Log: 2010-09-18 Richard Guenther rguent...@suse.de PR tree-optimization/45709 * tree-inline.c (copy_phis_for_bb): Delay commit of edge insertions until after all PHI nodes of the block are processed. * g++.dg/torture/pr45709.C: New testcase. * g++.dg/torture/pr45709-2.C: Likewise. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr45709-2.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr45709.C Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/tree-inline.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709