1 /* { dg-do compile } */ 2 /* { dg-options "-O -fdump-tree-ccp1" } */ 3 4 struct f { int i; }; g()5int g() 6 { 7 struct f a, *a1; 8 int *i; 9 a.i = 1; 10 a1 = &a; 11 i = &a1->i; 12 return *i; /* This should be turned into a.i */ 13 } 14 15 /* { dg-final { scan-tree-dump "= MEM\\\[\\\(int \\\*\\\)&a\\\];" "ccp1" } } */ 16