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
/
20100827-1.c
blob
8a531b99bb19dc40e9ea88d34903df4ae1b9d8f5
1
extern
void
abort
(
void
);
2
int
__attribute__
((
noinline
,
noclone
))
3
foo
(
char
*
p
)
4
{
5
int
h
=
0
;
6
do
7
{
8
if
(*
p
==
'\0'
)
9
break
;
10
++
h
;
11
if
(
p
==
0
)
12
abort
();
13
++
p
;
14
}
15
while
(
1
);
16
return
h
;
17
}
18
int
main
()
19
{
20
if
(
foo
(
"a"
) !=
1
)
21
abort
();
22
return
0
;
23
}