diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-27 22:37:39 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-27 22:37:39 +0000 |
commit | 16fe30897f6c8e3da68d00a0c97bbcd9bd157ba0 (patch) | |
tree | cbedb3f56b939f163e28dad691890cef4b42f791 /gcc/cfgexpand.c | |
parent | 9d1d1fab71330589fa41049fda3db3bd9c380093 (diff) | |
download | gcc-16fe30897f6c8e3da68d00a0c97bbcd9bd157ba0.tar.gz |
gcc/
2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/39315
* cfgexpand.c (expand_one_stack_var_at): Change alignment
limit to MAX_SUPPORTED_STACK_ALIGNMENT.
gcc/testsuite/
2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/39315
* gcc.target/i386/pr39315-1.c: New.
* gcc.target/i386/pr39315-2.c: Likewise.
* gcc.target/i386/pr39315-3.c: Likewise.
* gcc.target/i386/pr39315-4.c: Likewise.
* gcc.target/i386/pr39315-check.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4bfdc5fed74..695e4ef0ef9 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -866,7 +866,8 @@ dump_stack_var_partition (void) static void expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset) { - HOST_WIDE_INT align; + /* Alignment is unsigned. */ + unsigned HOST_WIDE_INT align; rtx x; /* If this fails, we've overflowed the stack frame. Error nicely? */ @@ -879,8 +880,10 @@ expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset) offset -= frame_phase; align = offset & -offset; align *= BITS_PER_UNIT; - if (align > STACK_BOUNDARY || align == 0) + if (align == 0) align = STACK_BOUNDARY; + else if (align > MAX_SUPPORTED_STACK_ALIGNMENT) + align = MAX_SUPPORTED_STACK_ALIGNMENT; DECL_ALIGN (decl) = align; DECL_USER_ALIGN (decl) = 0; |