blob: 05cf037c2abd56f7e389cebccf92944bd65f4521 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* { dg-do compile } */
/* { dg-options "-O1 -fno-strict-aliasing -fdump-tree-optimized" } */
struct S
{
int i;
int j;
};
struct U
{
struct S a[10];
};
int
foo (struct U *u, int n, int i, int j)
{
u->a[i].i = 123;
u->a[j].j = j;
return u->a[i].i;
}
/* { dg-final { scan-tree-dump-times "return 123" 1 "optimized"} } */
|