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
/
20171008-1.c
blob
cde807a70b3887b324f67635f17e3c541e7aec61
1
struct
S
{
char
c1
,
c2
,
c3
,
c4
; }
__attribute__
((
aligned
(
4
)));
2
3
static char
bar
(
char
**
p
)
__attribute__
((
noclone
,
noinline
));
4
static struct
S
foo
(
void
)
__attribute__
((
noclone
,
noinline
));
5
6
int
i
;
7
8
static char
9
bar
(
char
**
p
)
10
{
11
i
=
1
;
12
return
0
;
13
}
14
15
static struct
S
16
foo
(
void
)
17
{
18
struct
S ret
;
19
char
r
,
s
,
c1
,
c2
;
20
char
*
p
= &
r
;
21
22
s
=
bar
(&
p
);
23
if
(
s
)
24
c2
= *
p
;
25
c1
=
0
;
26
27
ret
.
c1
=
c1
;
28
ret
.
c2
=
c2
;
29
return
ret
;
30
}
31
32
int
main
(
void
)
33
{
34
struct
S s
=
foo
();
35
if
(
s
.
c1
!=
0
)
36
__builtin_abort
();
37
return
0
;
38
}