diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-01-07 09:45:54 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-01-07 09:45:54 +0100 |
commit | 8fc708b795bd3910524f1e62e1d0066cae7d9c5e (patch) | |
tree | 254f4d82e10f3f162b44144b402ba06abc6794b0 /gcc/gimple-expr.c | |
parent | 827d8502a59f32ed533ccf7c76ba32ea6bc27b30 (diff) |
re PR c/68960 (__attribute__ ((aligned ())) is ignored for OpenMP private variables)
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.
From-SVN: r232122
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r-- | gcc/gimple-expr.c | 5 |
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; } |