diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-02-10 04:13:42 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-02-10 04:13:42 -0800 |
commit | 9547f24e09cb9cf4db70f0ad308d2f03015c7d81 (patch) | |
tree | 16b168d8b010c84e72d37f9aa22e216d5a2a8b3d /gcc/testsuite/gcc.target/avr/pr60991.c | |
parent | 5a28f86b322357cb07d2ae3a42fa39f0749cf9f2 (diff) | |
parent | ae10eb82fe34c18640ad65c2ab94ffc53f349315 (diff) | |
download | gcc-9547f24e09cb9cf4db70f0ad308d2f03015c7d81.tar.gz |
Merge remote-tracking branch 'origin/gcc-4_7-branch' into hjl/x32/gcc-4_7-branchhjl/x32/gcc-4_7-branch
Diffstat (limited to 'gcc/testsuite/gcc.target/avr/pr60991.c')
-rw-r--r-- | gcc/testsuite/gcc.target/avr/pr60991.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/avr/pr60991.c b/gcc/testsuite/gcc.target/avr/pr60991.c new file mode 100644 index 00000000000..a09f42a62b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/avr/pr60991.c @@ -0,0 +1,21 @@ +/* { dg-do run } */ +/* { dg-options "-O1" } */ + +/* This testcase (simplified from the original bug report) exposes + PR60991. The code generated for writing the __int24 value corrupts + the frame pointer if the offset is <= 63 + MAX_LD_OFFSET */ + +#include <stdlib.h> + +int main(void) +{ + volatile char junk[62]; + junk[0] = 5; + volatile __int24 staticConfig = 0; + + if (junk[0] != 5) + abort(); + + exit(0); + return 0; +} |