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
PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr22061-1.c
blob
ffd6ccc7b46b26231baa7cc4c025dddf721bfac3
1
/* { dg-require-effective-target alloca } */
2
int
N
=
1
;
3
void
foo
() {}
/* Necessary to trigger the original ICE. */
4
void
bar
(
char
a
[
2
][
N
]) {
a
[
1
][
0
] =
N
; }
5
int
6
main
(
void
)
7
{
8
void
*
x
;
9
10
N
=
4
;
11
x
=
alloca
(
2
*
N
);
12
memset
(
x
,
0
,
2
*
N
);
13
bar
(
x
);
14
if
(
N
[(
char
*)
x
] !=
N
)
15
abort
();
16
exit
(
0
);
17
}