From a873b76f0ef06b7c75d17079fb5fd3da70daa068 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 13 Jun 2019 23:56:37 +0200 Subject: [PATCH] re PR bootstrap/90873 (-Wmaybe-uninitialized warning in gcc/tree-ssa-forwprop.c breaks 32-bit bootstrap) 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 | 6 ++++++ gcc/tree-ssa-alias.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9632a157393..09e05e69743 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-06-13 Jan Hubicka + + 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 * config/i386/i386.md (SWIM1248s): Rename from SWIM1248x. diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 2d2b3b86cfd..8209b0dd34f 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -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)) -- 2.30.2