LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / pr64307.c
blob79d93af6eb7a903e6d168f13294ec7f3cf7d1443
1 /* { dg-do compile { target c99_runtime } } */
2 /* { dg-options "-O0 -fipa-icf -fdump-ipa-icf" } */
4 #include <complex.h>
6 typedef _Complex float COMPLEX_FLOAT;
8 __attribute__ ((noinline))
9 static float real_part(COMPLEX_FLOAT a)
11 return *(float*)(&a);
14 __attribute__ ((noinline))
15 static float real_part_2(COMPLEX_FLOAT a)
17 return ((float*)(&a))[0];
20 int main()
22 COMPLEX_FLOAT f = 1.0f + _Complex_I;
24 float r1 = real_part(f);
25 float r2 = real_part_2(f);
27 return r1 - r2;
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" } } */