blob: d4b74104cad2efc6c96c83b347ff00e94d3a2752 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* Check statements that are eliminated by inlining. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */
struct a {int a,b,c,d,e;};
void
accessfield (struct a a)
{
t(a.a);
/* Should compile as:
tmp = a.a
Will be eliminated by inlining
t (tmp); */
t2(&a);
t(a.a);
return;
/* Will be eliminated by inlining */
}
void
accessreference (struct a *a)
{
t(a->a);
/* Should compile as:
a.0_1 = a;
Will be eliminated by inlining
tmp = a.0_1->a;
50% will be eliminated by inlining
t (tmp) */
t2(&a);
return;
/* Will be eliminated by inlining */
}
/* { dg-final { scan-ipa-dump-times "Will be eliminated" 4 "inline" { xfail { { hppa*-*-* } && { ! lp64 } } } } } */
/* { dg-final { scan-ipa-dump-times "50. will be eliminated" 1 "inline" } } */
/* { dg-final { cleanup-ipa-dump "inline" } } */
|