From: Eric Botcazou Date: Fri, 11 Aug 2017 13:06:43 +0000 (+0000) Subject: tree-sra.c (build_access_from_expr_1): Use more precise diagnostics for storage order... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89e18b1a7be89b5a09ef8dc2cf1fda9442b88b89;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9be7f17931c..94fb7f805aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-08-11 Eric Botcazou + + * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics + for storage order barriers. + 2017-08-11 Martin Liska PR tree-opt/79987 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))