aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-01-07 09:45:54 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-01-07 09:45:54 +0100
commit8fc708b795bd3910524f1e62e1d0066cae7d9c5e (patch)
tree254f4d82e10f3f162b44144b402ba06abc6794b0 /gcc
parent827d8502a59f32ed533ccf7c76ba32ea6bc27b30 (diff)
downloadgcc-8fc708b795bd3910524f1e62e1d0066cae7d9c5e.zip
gcc-8fc708b795bd3910524f1e62e1d0066cae7d9c5e.tar.gz
gcc-8fc708b795bd3910524f1e62e1d0066cae7d9c5e.tar.bz2
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')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimple-expr.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 832416e..b690c97 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/68960
+ * gimple-expr.c (copy_var_decl): If var has DECL_USER_ALIGN set, copy
+ it and DECL_ALIGN too.
+
2016-01-06 Robert Suchanek <robert.suchanek@imgtec.com>
* config/mips/mips-ftypes.def: Sort to lexicographical order.
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c
index 97b118e..15bef7f 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;
}