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 tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20141107-1.c
blob
e4590b39e495aa3df31886c54a217078cd0c5ef8
1
#define bool _Bool
2
3
bool
f
(
int
a
,
bool
c
)
__attribute__
((
noinline
));
4
bool
f
(
int
a
,
bool
c
)
5
{
6
if
(!
a
)
7
c
= !
c
;
8
return
c
;
9
}
10
11
void
checkf
(
int
a
,
bool
b
)
12
{
13
bool
c
=
f
(
a
,
b
);
14
char
d
;
15
__builtin_memcpy
(&
d
, &
c
,
1
);
16
if
(
d
!= (
a
==
0
)^
b
)
17
__builtin_abort
();
18
}
19
20
int
main
(
void
)
21
{
22
checkf
(
0
,
0
);
23
checkf
(
0
,
1
);
24
checkf
(
1
,
1
);
25
checkf
(
1
,
0
);
26
return
0
;
27
}