1 /* { dg-do compile } */ 2 /* { dg-options "-O -fdump-tree-ccp1" } */ 3 4 /* Make sure we propagate through POINTER_PLUS_EXPRs. */ 5 6 struct A { 7 int i[2]; 8 } a; 9 foo(void)10int foo (void) 11 { 12 struct A *p = &a; 13 int *q = (int *)p; 14 int *x = q + 1; 15 return *x; 16 } 17 18 /* { dg-final { scan-tree-dump "MEM\\\[\\\(int \\\*\\\)&a \\\+ 4B\\\]" "ccp1" } } */ 19 /* { dg-final { cleanup-tree-dump "ccp1" } } */ 20