tree-ssa-alias.c (nonoverlapping_component_refs_p): Also truncate access path on...
authorJan Hubicka <hubicka@ucw.cz>
Mon, 17 Jun 2019 10:22:39 +0000 (12:22 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 17 Jun 2019 10:22:39 +0000 (10:22 +0000)
* tree-ssa-alias.c (nonoverlapping_component_refs_p): Also truncate
access path on BIT_FIELD_REFs.

From-SVN: r272380

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

index d2f4db4a89b51e0e24fdfe696e874f5869a42644..43519721ee6e47823291d3b0efaaeae2916149cc 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-17  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-ssa-alias.c (nonoverlapping_component_refs_p): Also truncate
+       access path on BIT_FIELD_REFs.
+
 2019-06-17  Martin Liska  <mliska@suse.cz>
 
        PR ipa/90874
index b9cdc854249533a1ced9f257f2d22958fb5342ab..399e06c3825b6d926cd066127194481e85642608 100644 (file)
@@ -1268,7 +1268,8 @@ nonoverlapping_component_refs_p (const_tree x, const_tree y)
          if (TREE_CODE (type) == RECORD_TYPE)
            fieldsx.safe_push (field);
        }
-      else if (TREE_CODE (x) == VIEW_CONVERT_EXPR)
+      else if (TREE_CODE (x) == VIEW_CONVERT_EXPR
+              || TREE_CODE (x) == BIT_FIELD_REF)
        fieldsx.truncate (0);
       x = TREE_OPERAND (x, 0);
     }
@@ -1284,7 +1285,8 @@ nonoverlapping_component_refs_p (const_tree x, const_tree y)
          if (TREE_CODE (type) == RECORD_TYPE)
            fieldsy.safe_push (TREE_OPERAND (y, 1));
        }
-      else if (TREE_CODE (y) == VIEW_CONVERT_EXPR)
+      else if (TREE_CODE (y) == VIEW_CONVERT_EXPR
+              || TREE_CODE (y) == BIT_FIELD_REF)
        fieldsy.truncate (0);
       y = TREE_OPERAND (y, 0);
     }