1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1" } */
13 struct A
*q
= (struct A
*) p
;
20 struct B
*q
= (struct B
*) p
;
24 /* The first access is through struct A, so a.b.i is fine,
25 the second access needs to preserve the original access type struct B. */
27 /* { dg-final { scan-tree-dump-times "a.b.i" 1 "ccp1" } } */
28 /* { dg-final { scan-tree-dump-times "MEM\\\[\\\(struct B \\\*\\\)&a\\\].i" 1 "ccp1" } } */