aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2006-09-07 15:36:50 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-09-07 08:36:50 -0700
commitc9eee440af989f8b2cd8ec69b094983385779d53 (patch)
treeb9105416a869b71596a9e2ee6d943229805350dd /gcc
parent5cfa6a4e9b5874ae21ff45df961dcbcbee98e952 (diff)
downloadgcc-c9eee440af989f8b2cd8ec69b094983385779d53.zip
gcc-c9eee440af989f8b2cd8ec69b094983385779d53.tar.gz
gcc-c9eee440af989f8b2cd8ec69b094983385779d53.tar.bz2
re PR middle-end/28862 (attribute ((aligned)) ignored on vector variables)
2006-09-07 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/28862 * stor-layout.c (relayout_decl): Don't zero the alignment if it was set by the user. 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/28862 * gcc.c-torture/compile/vector-align-1.c: New test. From-SVN: r116751
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/stor-layout.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/vector-align-1.c11
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f3d086b..b3e4028 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/28862
+ * stor-layout.c (relayout_decl): Don't zero the alignment if it
+ was set by the user.
+
2006-09-07 Paolo Bonzini <bonzini@gnu.org>
PR target/27117
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 415f7c1..d1e18a2 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -489,7 +489,8 @@ relayout_decl (tree decl)
{
DECL_SIZE (decl) = DECL_SIZE_UNIT (decl) = 0;
DECL_MODE (decl) = VOIDmode;
- DECL_ALIGN (decl) = 0;
+ if (!DECL_USER_ALIGN (decl))
+ DECL_ALIGN (decl) = 0;
SET_DECL_RTL (decl, 0);
layout_decl (decl, 0);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0e052be..d8a5631 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/28862
+ * gcc.c-torture/compile/vector-align-1.c: New test.
+
2006-09-06 Andrew Pinski <pinskia@physics.uc.edu>
PR rtl-opt/27883
diff --git a/gcc/testsuite/gcc.c-torture/compile/vector-align-1.c b/gcc/testsuite/gcc.c-torture/compile/vector-align-1.c
new file mode 100644
index 0000000..dc97ba6c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/vector-align-1.c
@@ -0,0 +1,11 @@
+/* Check to make sure the alignment on vectors is not being lost. */
+
+/* If some target has a Max alignment less than 128, please create
+ a #ifdef around the alignment and add your alignment. */
+#define alignment 128
+
+char x __attribute__((aligned(alignment),vector_size(2)));
+
+
+int f[__alignof__(x) == alignment?1:-1];
+