Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-7.c

raw
1 /* Test normalization of MEM_REF expressions in dom. */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fno-tree-fre -fno-tree-pre -fdump-tree-optimized" } */
4
5 typedef struct {
6 int a[8];
7 } foo;
8
9 foo f;
10
11 int
12 test ()
13 {
14 foo g;
15 g.a[0] = 1; g.a[1] = 2; g.a[2] = 3; g.a[3] = 4;
16 g.a[4] = 5; g.a[5] = 6; g.a[6] = 7; g.a[7] = 8;
17 f=g;
18 return f.a[2];
19 }
20
21 /* { dg-final { scan-tree-dump-times "return 3;" 1 "optimized" } } */