This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions


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;
                }
            }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]