Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/alias-access-path-1.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-fre1" } */
3
4 struct a {int a1; int a2;};
5 struct b:a {};
6
7 struct b bvar,*bptr2;
8 int
9 test(void)
10 {
11 struct a *bptr = &bvar;
12 bptr->a2=0;
13 bptr2->a1=1;
14 return bptr->a2;
15 }
16 int
17 test2(void)
18 {
19 struct b *bptr = &bvar;
20 bptr->a2=0;
21 bptr2->a1=1;
22 return bptr->a2;
23 }
24 /* { dg-final { scan-tree-dump-times "return 0" 2 "fre1" } } */