diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index ab2efac..81a18a0 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5854,7 +5854,8 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, gimple_test_f, fallback); break; - case ARRAY_REF: case ARRAY_RANGE_REF: + case ARRAY_REF: + case ARRAY_RANGE_REF: gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p, gimple_test_f, fallback); gimplify_expr (&TREE_OPERAND (*expr_p, 1), pre_p, post_p, @@ -5863,16 +5864,17 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, default: /* Anything else with side-effects must be converted to - a valid statement before we get here. */ + a valid statement before we get here. */ gcc_unreachable (); } *expr_p = NULL; } - else if (COMPLETE_TYPE_P (TREE_TYPE (*expr_p))) + else if (COMPLETE_TYPE_P (TREE_TYPE (*expr_p)) + && TYPE_MODE (TREE_TYPE (*expr_p)) != BLKmode) { - /* Historically, the compiler has treated a bare - reference to a volatile lvalue as forcing a load. */ + /* Historically, the compiler has treated a bare reference + to a non-BLKmode volatile lvalue as forcing a load. */ tree type = TYPE_MAIN_VARIANT (TREE_TYPE (*expr_p)); /* Normally, we do not want to create a temporary for a TREE_ADDRESSABLE type because such a type should not be @@ -5887,7 +5889,10 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, } else /* We can't do anything useful with a volatile reference to - incomplete type, so just throw it away. */ + an incomplete type, so just throw it away. Likewise for + a BLKmode type, since any implicit inner load should + already have been turned into an explicit one by the + gimplification process. */ *expr_p = NULL; } |