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.dg
/
ipa
/
ipa-pta-16.c
blob
83b9cd8e1e37a4ab9d2f48e096b0e3906fa6eb80
1
/* { dg-do run } */
2
/* { dg-options "-O2 -fno-tree-sra -fipa-pta -fdump-ipa-pta2" } */
3
4
struct
X
5
{
6
long
l1
;
7
struct
Y
8
{
9
long
l2
;
10
int
*
p
;
11
}
y
;
12
};
13
int
i
;
14
static int
__attribute__
((
noinline
))
15
foo
(
struct
X
*
x
)
16
{
17
struct
Y y
=
x
->
y
;
18
*
y
.
p
=
0
;
19
i
=
1
;
20
return
*
y
.
p
;
21
}
22
extern
void
abort
(
void
);
23
int
main
()
24
{
25
struct
X x
;
26
x
.
y
.
p
= &
i
;
27
if
(
foo
(&
x
) !=
1
)
28
abort
();
29
return
0
;
30
}
31
32
/* { dg-final { scan-ipa-dump "y.\[0-9\]*\\\+\[0-9\]* = { i }" "pta2" } } */