summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/alias-5.c
blob: f1faae52c9c8e69896cae5d3a0598f1a5a52b0e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

struct {
	int i;
	struct {
		struct {
			int i;
		} x[2];
	} b;
} a;

int foo(void)
{
	a.i = 1;
	a.b.x[0].i = 0;
	a.b.x[1].i = 1;
	return a.i + a.b.x[0].i;
}

/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */