summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-08-11 13:06:43 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-08-11 13:06:43 +0000
commit89e18b1a7be89b5a09ef8dc2cf1fda9442b88b89 (patch)
treebf79a31ab918c22330a2c8995f0e9b84c5debf89 /gcc/tree-sra.c
parentfe8a99d8cdcfacf14b603b99a7730d18ce0ccd1f (diff)
tree-sra.c (build_access_from_expr_1): Use more precise diagnostics for storage order barriers.
* tree-sra.c (build_access_from_expr_1): Use more precise diagnostics for storage order barriers. From-SVN: r251050
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index c9865c6eb31..68edbce21b3 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1175,11 +1175,17 @@ build_access_from_expr_1 (tree expr, gimple *stmt, bool write)
else
partial_ref = false;
+ if (storage_order_barrier_p (expr))
+ {
+ disqualify_base_of_expr (expr, "storage order barrier.");
+ return NULL;
+ }
+
/* We need to dive through V_C_Es in order to get the size of its parameter
and not the result type. Ada produces such statements. We are also
capable of handling the topmost V_C_E but not any of those buried in other
handled components. */
- if (TREE_CODE (expr) == VIEW_CONVERT_EXPR && !storage_order_barrier_p (expr))
+ if (TREE_CODE (expr) == VIEW_CONVERT_EXPR)
expr = TREE_OPERAND (expr, 0);
if (contains_view_convert_expr_p (expr))