1 /* { dg-do compile { target c99_runtime } } */
2 /* { dg-options "-O0 -fipa-icf -fdump-ipa-icf" } */
6 typedef _Complex
float COMPLEX_FLOAT
;
8 __attribute__ ((noinline
))
9 static float real_part(COMPLEX_FLOAT a
)
14 __attribute__ ((noinline
))
15 static float real_part_2(COMPLEX_FLOAT a
)
17 return ((float*)(&a
))[0];
22 COMPLEX_FLOAT f
= 1.0f
+ _Complex_I
;
24 float r1
= real_part(f
);
25 float r2
= real_part_2(f
);
30 /* { dg-final { scan-ipa-dump "Semantic equality hit:real_part->real_part_2" "icf" } } */
31 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */