diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2011-03-17 14:02:12 +0000 |
---|---|---|
committer | Chung-Lin Tang <cltang@gcc.gnu.org> | 2011-03-17 14:02:12 +0000 |
commit | 7c71147df33fe3ee5e8352fba3d6cfbc15810604 (patch) | |
tree | 433b51acf965d7c376d289696f3f09e3de8f7cec /gcc | |
parent | 0e1ee172e8c780d1b4720ee85690aeea73c6afbf (diff) | |
download | gcc-7c71147df33fe3ee5e8352fba3d6cfbc15810604.zip gcc-7c71147df33fe3ee5e8352fba3d6cfbc15810604.tar.gz gcc-7c71147df33fe3ee5e8352fba3d6cfbc15810604.tar.bz2 |
re PR target/43872 (VLAs are not aligned correctly on ARM)
2011-03-17 Chung-Lin Tang <cltang@codesourcery.com>
PR target/43872
* config/arm/arm.c (arm_get_frame_offsets): Adjust early
return condition with !cfun->calls_alloca.
From-SVN: r171096
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5a5592..bc80f7a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-17 Chung-Lin Tang <cltang@codesourcery.com> + + PR target/43872 + * config/arm/arm.c (arm_get_frame_offsets): Adjust early + return condition with !cfun->calls_alloca. + 2011-03-17 Richard Guenther <rguenther@suse.de> PR bootstrap/48148 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 8515002..c6ba3fb 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -15415,7 +15415,10 @@ arm_get_frame_offsets (void) offsets->soft_frame = offsets->saved_regs + CALLER_INTERWORKING_SLOT_SIZE; /* A leaf function does not need any stack alignment if it has nothing on the stack. */ - if (leaf && frame_size == 0) + if (leaf && frame_size == 0 + /* However if it calls alloca(), we have a dynamically allocated + block of BIGGEST_ALIGNMENT on stack, so still do stack alignment. */ + && ! cfun->calls_alloca) { offsets->outgoing_args = offsets->soft_frame; offsets->locals_base = offsets->soft_frame; |