diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c b/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c new file mode 100644 index 000000000..87b44b530 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-fre-details" } */ + +struct S { float f; }; +int __attribute__((noinline)) +foo (float *r, struct S *p) +{ + int *q = (int *)&p->f; + int i = *q; + *r = 0.0; + return i + *q; +} + +/* { dg-final { scan-tree-dump "Replaced\[^\n\]*with i_." "fre" } } */ +/* { dg-final { cleanup-tree-dump "fre" } } */ |