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
x86: Tune Skylake, Cannonlake and Icelake as Haswell
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr34415.c
blob
ec75394afe0f8381445d326101d04dae3963e29e
1
const char
*
__attribute__
((
noinline
))
2
foo
(
const char
*
p
)
3
{
4
const char
*
end
;
5
int
len
=
1
;
6
for
(;;)
7
{
8
int
c
= *
p
;
9
c
= (
c
>=
'a'
&&
c
<=
'z'
?
c
-
'a'
+
'A'
:
c
);
10
if
(
c
==
'B'
)
11
end
=
p
;
12
else if
(
c
==
'A'
)
13
{
14
end
=
p
;
15
do
16
p
++;
17
while
(*
p
==
'+'
);
18
}
19
else
20
break
;
21
p
++;
22
len
++;
23
}
24
if
(
len
>
2
&& *
p
==
':'
)
25
p
=
end
;
26
return
p
;
27
}
28
29
int
30
main
(
void
)
31
{
32
const char
*
input
=
"Bbb:"
;
33
return
foo
(
input
) !=
input
+
2
;
34
}