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.c-torture
/
compile
/
pr34029-1.c
blob
526112974b27fb1da6171998b44258f87c629a2b
1
static const char
s
[] =
"ab.cd.efghijk"
;
2
3
int
4
foo
(
const char
*
x
)
5
{
6
const char
*
a
;
7
int
b
=
0
;
8
9
a
=
__builtin_strchr
(
s
,
'.'
);
10
if
(
a
==
0
)
11
b
=
1
;
12
else if
((
a
=
__builtin_strchr
(
a
+
1
,
'.'
)) ==
0
)
13
b
=
1
;
14
else if
(
__builtin_strncmp
(
s
,
x
,
a
-
s
))
15
b
=
1
;
16
else if
(
__builtin_strncmp
(
a
+
1
,
x
+ (
a
-
s
+
1
),
4
) <
0
)
17
b
=
1
;
18
19
if
(
b
)
20
return
4
;
21
return
0
;
22
}