This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/56384] [4.8 Regression] ICE in fold_binary_loc, at fold-const.c:10422
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Feb 2013 10:09:13 +0000
- Subject: [Bug tree-optimization/56384] [4.8 Regression] ICE in fold_binary_loc, at fold-const.c:10422
- Auto-submitted: auto-generated
- References: <bug-56384-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56384
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-19 10:09:13 UTC ---
Ok, so the issue here is that we value-number
unsigned char b_20 = PHI <b_15(3), b_15(10), 1(7), 5(9)>
int a.4_25 = PHI <a.4_16(3), a.4_16(10), 1(7), 5(9)>
the same as value-numbers from BB 3 and BB 10 are still VN_TOP, so
static int
vn_phi_eq (const void *p1, const void *p2)
{
...
/* If the PHI nodes do not have compatible types
they are not the same. */
if (!types_compatible_p (TREE_TYPE (vp1->phiargs[0]),
TREE_TYPE (vp2->phiargs[0])))
return false;
compares "garbage".
I have a patch.