c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / bit-cast1.C
blob34cd1b93746ecbd40b56c3b192f9b698663ce872
1 // { dg-do compile }
3 struct S { short a, b; };
4 struct T { float a[16]; };
5 struct U { int b[16]; };
7 #if __SIZEOF_FLOAT__ == __SIZEOF_INT__
8 int
9 f1 (float x)
11   return __builtin_bit_cast (int, x);
13 #endif
15 #if 2 * __SIZEOF_SHORT__ == __SIZEOF_INT__
17 f2 (int x)
19   return __builtin_bit_cast (S, x);
22 int
23 f3 (S x)
25   return __builtin_bit_cast (int, x);
27 #endif
29 #if __SIZEOF_FLOAT__ == __SIZEOF_INT__
31 f4 (T &x)
33   return __builtin_bit_cast (U, x);
37 f5 (int (&x)[16])
39   return __builtin_bit_cast (T, x);
41 #endif
43 int
44 f6 ()
46   return __builtin_bit_cast (unsigned char, (signed char) 0);