[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
-- What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Keywords||ice-on-valid-code Summary|use of poisoned ggc memory |[4.1 Regression] use of |causes cpu2000 build|poisoned ggc memory causes |failures|cpu2000 build failures Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-15 19:58 --- Here is a testcase which removes the use of uninitialized variables and still crashes: subroutine foo(z, nx,j,k,l,nz) implicit real*8 (a-h,o-z) real u(5,60,60,60) do i = 2, nx-1 x = dble(i) / (nx) do m = 1, 5 u(m,i,j,k) = x * u(m,1,j,k) + z * u(m,i,j,nz) + u(m,i,j,l) end do end do return end -- What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2005-04-15 19:58:49 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-15 20:12 --- Here is a reduced testcase with the additional option of --param ggc-min-expand=0 which forces collection all the time: subroutine foo( nx,j,dble) implicit none integer i,j,nx real*8 x,dble(nx) real u(5,60,60) do i = 2, nx-1 x = dble(i) / (nx) u(2,i,j) = x end do return end -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-15 20:46 --- Applying the following patch causes the ICE to be seen earlier: Index: tree-ssa-loop-im.c === RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-im.c,v retrieving revision 2.36 diff -u -p -r2.36 tree-ssa-loop-im.c --- tree-ssa-loop-im.c 11 Apr 2005 20:17:38 - 2.36 +++ tree-ssa-loop-im.c 15 Apr 2005 20:45:58 - @@ -38,6 +38,7 @@ Software Foundation, 59 Temple Place - S #include "tree-pass.h" #include "flags.h" #include "real.h" +#include "ggc.h" /* TODO: Support for predicated code motion. I.e. @@ -622,9 +623,10 @@ determine_invariantness_stmt (struct dom The multiply stmt is not invariant, so update iterator and avoid rescanning. */ bsi_replace (&bsi, stmt1, true); - get_stmt_operands (stmt1); /* Should not be necessary. */ bsi_insert_after (&bsi, stmt2, BSI_NEW_STMT); SSA_NAME_DEF_STMT (lhs) = stmt2; + ggc_collect (); + verify_ssa (true); /* Continue processing with invariant reciprocal statment. */ stmt = stmt1; I think we are missing an update use. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-15 21:11 --- I am testing the following patch: Index: tree-ssa-loop-im.c === RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-im.c,v retrieving revision 2.36 diff -u -p -r2.36 tree-ssa-loop-im.c --- tree-ssa-loop-im.c 11 Apr 2005 20:17:38 - 2.36 +++ tree-ssa-loop-im.c 15 Apr 2005 21:10:37 - @@ -38,6 +38,7 @@ Software Foundation, 59 Temple Place - S #include "tree-pass.h" #include "flags.h" #include "real.h" +#include "tree-ssa-propagate.h" /* TODO: Support for predicated code motion. I.e. @@ -600,7 +601,7 @@ determine_invariantness_stmt (struct dom && outermost_invariant_loop_expr (rhs, loop_containing_stmt (stmt)) == NULL) { - tree lhs, stmt1, stmt2, var, name; + tree lhs, stmt1, var, name, tmp; lhs = TREE_OPERAND (stmt, 0); @@ -614,17 +615,16 @@ determine_invariantness_stmt (struct dom TREE_OPERAND (rhs, 1))); name = make_ssa_name (var, stmt1); TREE_OPERAND (stmt1, 0) = name; - stmt2 = build2 (MODIFY_EXPR, void_type_node, lhs, - build2 (MULT_EXPR, TREE_TYPE (rhs), - name, TREE_OPERAND (rhs, 0))); + tmp = build2 (MULT_EXPR, TREE_TYPE (rhs), + name, TREE_OPERAND (rhs, 0)); /* Replace division stmt with reciprocal and multiply stmts. The multiply stmt is not invariant, so update iterator and avoid rescanning. */ - bsi_replace (&bsi, stmt1, true); - get_stmt_operands (stmt1); /* Should not be necessary. */ - bsi_insert_after (&bsi, stmt2, BSI_NEW_STMT); - SSA_NAME_DEF_STMT (lhs) = stmt2; + bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); + if (!set_rhs (bsi_stmt_ptr (bsi), tmp)) + abort (); + update_stmt (stmt); /* Continue processing with invariant reciprocal statment. */ stmt = stmt1; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From dje at gcc dot gnu dot org 2005-04-15 23:54 --- debug_immediate_uses() does not seem right after the reciprocal transformation: BEFORE D.478_11 : --> single use. x_14 = D.478_11 / pretmp.3_54; pretmp.3_54 : -->2 uses. x_14 = D.478_11 / pretmp.3_54; D.479_13 = pretmp.3_54; AFTER D.478_11 : -->2 uses. x_14 = D.478_11 * reciptmp.7_42; x_14 = D.478_11 / pretmp.3_54; reciptmp.7_42 : --> single use. x_14 = D.478_11 * reciptmp.7_42; pretmp.3_54 : -->3 uses. reciptmp.7_42 = 1.0e+0 / pretmp.3_54; x_14 = D.478_11 / pretmp.3_54; D.479_13 = pretmp.3_54; Why are the original division stmts still present? If the immediate uses still exist in the list but the statements were overwritten, that might cause problems. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-16 19:20 --- Andrew could you look into this and see why the use info is not being updated correctly? Also note the patch in comment #4 is only working around the buggyness of the use information not being updated correctly. -- What|Removed |Added CC||amacleod at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25 15:15 --- *** Bug 21219 has been marked as a duplicate of this bug. *** -- What|Removed |Added CC||micis at gmx dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From janis187 at us dot ibm dot com 2005-04-25 19:18 --- Subject: Re: [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures Yes, I'll do a bootstrap and testrun and try the CPU2000 test. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From dje at watson dot ibm dot com 2005-04-25 19:20 --- Subject: Re: [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures The patch fixes the testcase for me on AIX. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From janis at gcc dot gnu dot org 2005-04-25 21:36 --- Two of the four CPU2000 tests started building again a couple of days ago and the other two are fixed with this patch, on powerpc64-linux with -m64 -O2 -ffast-math -funroll-loops. Bootstrap of c,c++,f95,objc succeeded, testsuite is still running. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From janis at gcc dot gnu dot org 2005-04-25 23:32 --- Test results for powerpc64-linux with -m32/-m64 are the same as for my last nightly build. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From micis at gmx dot de 2005-04-26 07:37 --- I rebuild the compiler with patch from Comment #8 and could now compile qt334 without problems. Michael Cieslinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048
[Bug tree-optimization/21048] [4.1 Regression] use of poisoned ggc memory causes cpu2000 build failures
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-26 17:53 --- Fixed. -- What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21048