From e67ddda63ca523614921f2baaf3d571791d32d1a Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 17 Jun 2019 12:22:39 +0200 Subject: [PATCH] tree-ssa-alias.c (nonoverlapping_component_refs_p): Also truncate access path on BIT_FIELD_REFs. * tree-ssa-alias.c (nonoverlapping_component_refs_p): Also truncate access path on BIT_FIELD_REFs. From-SVN: r272380 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-alias.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d2f4db4a89b..43519721ee6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-06-17 Jan Hubicka + + * tree-ssa-alias.c (nonoverlapping_component_refs_p): Also truncate + access path on BIT_FIELD_REFs. + 2019-06-17 Martin Liska PR ipa/90874 diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index b9cdc854249..399e06c3825 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -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); } -- 2.30.2