blob: 3940692cd6c396d2d2b06f55397d4ae2f46de27d (
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
|
/* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */
struct f
{
struct {
int i;
} ff[10];
};
struct f g;
int ffff(int i)
{
int t1 = 0;
int i1 = g.ff[t1].i;
int i2 = g.ff[i].i;
return i1 + i2;
}
/* We should not use extra temporaries apart from for i1 + i2. */
/* { dg-final { scan-tree-dump-times "int" 6 "gimple" } } */
/* { dg-final { scan-tree-dump-times "int D\\\." 1 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
|