diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-05 16:34:03 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-05 16:34:03 +0000 |
commit | 2bb1c7d19fcac422bec3fbb85f23152f42dacc44 (patch) | |
tree | 1793aeb9ad14055ff15e45441897b03c0f588054 /gcc/cfgexpand.c | |
parent | 625691b370eea498d303076170623434502e41f9 (diff) | |
download | gcc-2bb1c7d19fcac422bec3fbb85f23152f42dacc44.tar.gz |
2015-03-05 Steve Ellcey <sellcey@imgtec.com>
PR middle-end/65315
* cfgexpand.c (expand_stack_vars): Update large_align to maximum
needed alignment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221219 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 7dfe1f6e7f5..569cd0d2390 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -973,6 +973,13 @@ expand_stack_vars (bool (*pred) (size_t), struct stack_vars_data *data) i = stack_vars_sorted[si]; alignb = stack_vars[i].alignb; + /* All "large" alignment decls come before all "small" alignment + decls, but "large" alignment decls are not sorted based on + their alignment. Increase large_align to track the largest + required alignment. */ + if ((alignb * BITS_PER_UNIT) > large_align) + large_align = alignb * BITS_PER_UNIT; + /* Stop when we get to the first decl with "small" alignment. */ if (alignb * BITS_PER_UNIT <= MAX_SUPPORTED_STACK_ALIGNMENT) break; |