re PR bootstrap/90873 (-Wmaybe-uninitialized warning in gcc/tree-ssa-forwprop.c break...
authorJan Hubicka <hubicka@ucw.cz>
Thu, 13 Jun 2019 21:56:37 +0000 (23:56 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 13 Jun 2019 21:56:37 +0000 (21:56 +0000)
PR bootstrap/90873
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Also check that
dbase is not TARGET_MEM_REF.

From-SVN: r272273

gcc/ChangeLog
gcc/tree-ssa-alias.c

index 9632a1573934ab642d862cebd19b837575fa87e3..09e05e697432196f591e58111f8ae9c7abe284cc 100644 (file)
@@ -1,3 +1,9 @@
+2019-06-13  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR bootstrap/90873
+       * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Also check that
+       dbase is not TARGET_MEM_REF.
+
 2019-06-13  Uroš Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (SWIM1248s): Rename from SWIM1248x.
index 2d2b3b86cfdafacb1e9ac8695c0cbb0dc8e0aab3..8209b0dd34f62bb8703c7be69e62614e976ea786 100644 (file)
@@ -1393,8 +1393,10 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
      But avoid treating variable length arrays as "objects", instead assume they
      can overlap by an exact multiple of their element size.
      See gcc.dg/torture/alias-2.c.  */
-  if ((TREE_CODE (base1) != TARGET_MEM_REF
+  if (((TREE_CODE (base1) != TARGET_MEM_REF
        || (!TMR_INDEX (base1) && !TMR_INDEX2 (base1)))
+       && (TREE_CODE (dbase2) != TARGET_MEM_REF
+          || (!TMR_INDEX (dbase2) && !TMR_INDEX2 (base2))))
       && same_type_for_tbaa (TREE_TYPE (base1), TREE_TYPE (dbase2)) == 1
       && (TREE_CODE (TREE_TYPE (base1)) != ARRAY_TYPE
          || (TYPE_SIZE (TREE_TYPE (base1))