summaryrefslogtreecommitdiff
path: root/gcc/gimple-expr.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-07 08:45:54 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-07 08:45:54 +0000
commit70dc2f6ebdd9874533e1d6fe459e4d150cbe6091 (patch)
tree254f4d82e10f3f162b44144b402ba06abc6794b0 /gcc/gimple-expr.c
parent79e74ef91aac279455b26fe733382ceb3b042381 (diff)
downloadgcc-70dc2f6ebdd9874533e1d6fe459e4d150cbe6091.tar.gz
PR middle-end/68960
* gimple-expr.c (copy_var_decl): If var has DECL_USER_ALIGN set, copy it and DECL_ALIGN too. * testsuite/libgomp.c/pr68960.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232122 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r--gcc/gimple-expr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c
index 97b118e297e..15bef7f1665 100644
--- a/gcc/gimple-expr.c
+++ b/gcc/gimple-expr.c
@@ -375,6 +375,11 @@ copy_var_decl (tree var, tree name, tree type)
TREE_USED (copy) = 1;
DECL_SEEN_IN_BIND_EXPR_P (copy) = 1;
DECL_ATTRIBUTES (copy) = DECL_ATTRIBUTES (var);
+ if (DECL_USER_ALIGN (var))
+ {
+ DECL_ALIGN (copy) = DECL_ALIGN (var);
+ DECL_USER_ALIGN (copy) = 1;
+ }
return copy;
}