aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 13cf026..3f06d7a 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4411,8 +4411,9 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
{
/* Historically, the compiler has treated a bare
reference to a volatile lvalue as forcing a load. */
- tree tmp = create_tmp_var (TREE_TYPE (*expr_p), "vol");
- *expr_p = build (MODIFY_EXPR, TREE_TYPE (tmp), tmp, *expr_p);
+ tree type = TYPE_MAIN_VARIANT (TREE_TYPE (*expr_p));
+ tree tmp = create_tmp_var (type, "vol");
+ *expr_p = build (MODIFY_EXPR, type, tmp, *expr_p);
}
else
/* We can't do anything useful with a volatile reference to