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
2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
ssp-default.c
blob
3f65ed8a80d044fd333b9ef7954143e1e146c595
1
/* { dg-do run { target native } } */
2
/* { dg-require-effective-target fstack_protector_enabled } */
3
4
#include <stdlib.h>
5
6
void
7
__stack_chk_fail
(
void
)
8
{
9
exit
(
0
);
/* pass */
10
}
11
12
int
main
()
13
{
14
int
i
;
15
char
foo
[
255
];
16
17
/* smash stack */
18
for
(
i
=
0
;
i
<=
400
;
i
++)
19
foo
[
i
] =
42
;
20
21
return
1
;
/* fail */
22
}