]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR lto/63704 (-flto internal compiler error: in mems_in_disjoint_alias_s...
authorMartin Liska <mliska@suse.cz>
Thu, 15 Jan 2015 16:02:28 +0000 (17:02 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 15 Jan 2015 16:02:28 +0000 (16:02 +0000)
Backport from mainline

        2014-11-27  Richard Biener  <rguenther@suse.de>

PR middle-end/63704
* alias.c (mems_in_disjoint_alias_sets_p): Remove assert
and instead return false when !fstrict-aliasing.

From-SVN: r219663

gcc/ChangeLog
gcc/alias.c

index 619d69f24e13f1d714d9ba2c3f774262d5bdf9ff..177ffd16f87105adeebd0cc504e613df270ff601 100644 (file)
@@ -1,3 +1,12 @@
+2015-01-15  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       2014-11-27  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/63704
+       * alias.c (mems_in_disjoint_alias_sets_p): Remove assert
+       and instead return false when !fstrict-aliasing.
+
 2015-01-14  Renlin Li  <renlin.li@arm.com>
 
        Backport form mainline
index 381222c34872d3d2e4daa7e6015e6d07aa9d5a4e..5240982795cfc2dd3db45c272de55e8420385db2 100644 (file)
@@ -380,17 +380,9 @@ get_alias_set_entry (alias_set_type alias_set)
 static inline int
 mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2)
 {
-/* Perform a basic sanity check.  Namely, that there are no alias sets
-   if we're not using strict aliasing.  This helps to catch bugs
-   whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or
-   where a MEM is allocated in some way other than by the use of
-   gen_rtx_MEM, and the MEM_ALIAS_SET is not cleared.  If we begin to
-   use alias sets to indicate that spilled registers cannot alias each
-   other, we might need to remove this check.  */
-  gcc_assert (flag_strict_aliasing
-             || (!MEM_ALIAS_SET (mem1) && !MEM_ALIAS_SET (mem2)));
-
-  return ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), MEM_ALIAS_SET (mem2));
+  return (flag_strict_aliasing
+         && ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1),
+                                     MEM_ALIAS_SET (mem2)));
 }
 
 /* Insert the NODE into the splay tree given by DATA.  Used by