summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
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/stor-layout.c
parent5cfa6a4e9b5874ae21ff45df961dcbcbee98e952 (diff)
downloadgcc-c9eee440af989f8b2cd8ec69b094983385779d53.tar.gz
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/stor-layout.c')
-rw-r--r--gcc/stor-layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 415f7c1168e..d1e18a243d0 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);