repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2008-03-21 Janne Blomqvist <jb@gcc.gnu.org>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
ssp-1.c
blob
e71522bbfd3363b5f0a707821b9874067f0e508c
1
/* { dg-do run { target native } } */
2
/* { dg-options "-fstack-protector" } */
3
/* { dg-require-effective-target fstack_protector } */
4
5
#include <stdlib.h>
6
7
static void
8
__stack_chk_fail
(
void
)
9
{
10
exit
(
0
);
/* pass */
11
}
12
13
int
main
()
14
{
15
int
i
;
16
char
foo
[
255
];
17
18
// smash stack
19
for
(
i
=
0
;
i
<=
400
;
i
++)
20
foo
[
i
] =
42
;
21
22
return
1
;
/* fail */
23
}