blob: 3f65ed8a80d044fd333b9ef7954143e1e146c595 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* { dg-do run { target native } } */
/* { dg-require-effective-target fstack_protector_enabled } */
#include <stdlib.h>
void
__stack_chk_fail (void)
{
exit (0); /* pass */
}
int main ()
{
int i;
char foo[255];
/* smash stack */
for (i = 0; i <= 400; i++)
foo[i] = 42;
return 1; /* fail */
}
|