This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30840] [4.3 Regression] ice for legal code with flags -O3 -fno-strict-aliasing
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2007 12:56:58 -0000
- Subject: [Bug tree-optimization/30840] [4.3 Regression] ice for legal code with flags -O3 -fno-strict-aliasing
- References: <bug-30840-9596@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-02-19 12:56 -------
We can also simply check before the fact like
Index: tree-ssa-ccp.c
===================================================================
*** tree-ssa-ccp.c (revision 122127)
--- tree-ssa-ccp.c (working copy)
*************** visit_assignment (tree stmt, tree *outpu
*** 1212,1218 ****
&& operand_equal_p (nval->mem_ref, rhs, 0))
val = *nval;
else
! val = evaluate_stmt (stmt);
}
else
/* Evaluate the statement. */
--- 1212,1226 ----
&& operand_equal_p (nval->mem_ref, rhs, 0))
val = *nval;
else
! {
! val = evaluate_stmt (stmt);
! /* We need to be careful not to drop back to UNDEFINED from
! VARYING. This can happen because we only re-process the
! first virtual operand of a store. */
! if (val.lattice_val == UNDEFINED
! && get_value (lhs)->lattice_val > UNDEFINED)
! val.lattice_val = VARYING;
! }
}
else
/* Evaluate the statement. */
still not simulating the ssa edges for the other virtual operands does not
seem to be the best approach.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30840