This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions
- 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: Mon, 10 Mar 2014 13:18:33 +0000
- Subject: [Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions
- Auto-submitted: auto-generated
- References: <bug-60429-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60429
--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
AFAIK I can understand the reduced testcase AET is never written to anything
but the initial NULL pointers. Neither CerateETandAET nor loadAET do anything
to the PolygonRegion local AET.
I have a fix (bah, this function needs a LOT of TLC!)
Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c (revision 208448)
+++ gcc/tree-ssa-structalias.c (working copy)
@@ -3218,7 +3218,12 @@ get_constraint_for_component_ref (tree t
{
cexpr.var = curr->id;
results->safe_push (cexpr);
- if (address_p)
+ /* If we take the address and the field starts exactly
+ at the desired position that was all we need to add. */
+ if (address_p
+ && curr->offset == (unsigned HOST_WIDE_INT) bitpos
+ && bitmaxsize != -1
+ && bitsize == bitmaxsize)
break;
}
}