1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
4 typedef _Complex
float COMPLEX_FLOAT
;
5 float real_part(COMPLEX_FLOAT a
)
10 float real_part_2(COMPLEX_FLOAT a
)
12 return ((float*)(&a
))[0];
16 float imag_part(COMPLEX_FLOAT a
)
18 return ((float*)(&a
))[1];
21 /* Test that the above gets optimized to REALPART_EXPR and IMAGPART_EXPR
24 /* { dg-final { scan-tree-dump-times "REALPART_EXPR" 2 "optimized" } } */
25 /* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
26 /* { dg-final { cleanup-tree-dump "optimized" } } */