diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/avr/pr60991.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/avr/pr60991.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/avr/pr60991.c b/gcc-4.9/gcc/testsuite/gcc.target/avr/pr60991.c new file mode 100644 index 000000000..a09f42a62 --- /dev/null +++ b/gcc-4.9/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; +} |