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
/
lto-tbaa-1.c
blob
fe1e1771c7f9e496d600141aab7ae3883f4a4f1b
1
/* { dg-additional-options "-fno-early-inlining -fno-ipa-cp" } */
2
struct
a
{
3
float
*
b
;
4
} *
a
;
5
struct
b
{
6
int
*
b
;
7
}
b
;
8
struct
c
{
9
float
*
b
;
10
} *
c
;
11
int
d
;
12
use_a
(
struct
a
*
a
)
13
{
14
}
15
set_b
(
int
**
a
)
16
{
17
*
a
=&
d
;
18
}
19
use_c
(
struct
c
*
a
)
20
{
21
}
22
__attribute__
((
noinline
))
int
**
retme
(
int
**
val
)
23
{
24
return
val
;
25
}
26
int
e
;
27
struct
b b
= {&
e
};
28
struct
b b2
;
29
struct
b b3
;
30
int
**
ptr
= &
b2
.
b
;
31
main
()
32
{
33
a
= (
void
*)
0
;
34
b
.
b
=&
e
;
35
ptr
=
retme
( &
b
.
b
);
36
set_b
(
ptr
);
37
b3
=
b
;
38
if
(
b3
.
b
!= &
d
)
39
__builtin_abort
();
40
c
= (
void
*)
0
;
41
return
0
;
42
}