Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-17.c
blobb12ef2c22ea3b9094d3960fa0e777887d1008445
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1" } */
4 int foo(void)
6 int i = 0;
7 char *p = (char *)&i;
8 return *(int *)p;
11 struct Foo {
12 int i;
13 } f;
15 int bar(void)
17 char *p = (char *)&f;
18 return ((struct Foo *)p)->i;
21 extern const struct Foo g;
23 int foobar(void)
25 struct Foo *p = (struct Foo *)&g;
26 return ((const struct Foo *)p)->i;
29 /* { dg-final { scan-tree-dump "= i_.;" "ccp1" } } */
30 /* { dg-final { scan-tree-dump "= f.i;" "ccp1" } } */
31 /* { dg-final { scan-tree-dump "= g.i;" "ccp1" } } */