2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / m68k / 20100512-1.c
blobd07bb519abc1c50ead3f0af6a68205bde9c58e42
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fstack-protector" } */
3 /* { dg-require-effective-target fstack_protector } */
4 /* There should be 2 references to __stack_chk_guard in every function. */
5 /* { dg-final { scan-assembler-times "__stack_chk_guard" 4 } } */
7 #include <stdlib.h>
8 #include <string.h>
9 void doTest1(void) {
10 volatile char foo[10];
11 memset((void *)foo, 1, 100);
13 void doTest2(void) {
14 volatile char foo[10];
15 memset((void *)foo, 1, 100);