diff options
author | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-12 11:05:19 +0000 |
---|---|---|
committer | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-12 11:05:19 +0000 |
commit | b5d5f0d6d03083ab37fc960f3b3f3302922fdd82 (patch) | |
tree | 36f64b5002b88b0f635e32f7ffb14e7914f56ef2 /gcc/testsuite/gcc.target/m68k | |
parent | cfbbebf3da74eacec06d7f97c22a2f45193e58ac (diff) | |
download | gcc-b5d5f0d6d03083ab37fc960f3b3f3302922fdd82.tar.gz |
* targhooks.c (default_stack_protect_guard): Avoid sharing RTL
for __stack_chk_guard.
* gcc.target/m68k/20100512-1.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159310 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/m68k')
-rw-r--r-- | gcc/testsuite/gcc.target/m68k/20100512-1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/m68k/20100512-1.c b/gcc/testsuite/gcc.target/m68k/20100512-1.c new file mode 100644 index 00000000000..d07bb519abc --- /dev/null +++ b/gcc/testsuite/gcc.target/m68k/20100512-1.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fstack-protector" } */ +/* { dg-require-effective-target fstack_protector } */ +/* There should be 2 references to __stack_chk_guard in every function. */ +/* { dg-final { scan-assembler-times "__stack_chk_guard" 4 } } */ + +#include <stdlib.h> +#include <string.h> +void doTest1(void) { + volatile char foo[10]; + memset((void *)foo, 1, 100); +} +void doTest2(void) { + volatile char foo[10]; + memset((void *)foo, 1, 100); +} |