AVR: target/84211 - Add a post reload register optimization pass.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / bitint-25.c
blobc3cb26bb09dca38b096f6087d4a9a6693c8886b0
1 /* PR c/102989 */
2 /* { dg-do run { target { bitint && float16_runtime } } } */
3 /* { dg-options "-std=gnu23" } */
4 /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
5 /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
6 /* { dg-add-options float16 } */
8 int
9 main ()
11 #if __FLT16_MANT_DIG__ == 11
12 static volatile _Float16 s[] = {
13 0.0F16,
14 42.0F16,
15 -65504.0F16,
16 65504.0F16
18 static volatile _Float16 u[] = {
19 0.0F16,
20 1.0F16,
21 178.0F16,
22 65504.0F16
24 #if __BITINT_MAXWIDTH__ >= 135
25 static volatile _BitInt(135) s_135[] = {
26 0wb,
27 42wb,
28 -65504wb,
29 65504wb
31 static volatile unsigned _BitInt(135) u_135[] = {
32 0uwb,
33 1uwb,
34 178uwb,
35 65504uwb
37 for (int i = 0; i < 4; ++i)
39 if (s[i] != (_Float16) s_135[i]
40 || u[i] != (_Float16) u_135[i]
41 || (_BitInt(135)) s[i] != s_135[i]
42 || (unsigned _BitInt(135)) u[i] != u_135[i])
43 __builtin_abort ();
45 #endif
46 #if __BITINT_MAXWIDTH__ >= 192
47 static volatile _BitInt(192) s_192[] = {
48 0wb,
49 42wb,
50 -65504wb,
51 65504wb
53 static volatile unsigned _BitInt(192) u_192[] = {
54 0uwb,
55 1uwb,
56 178uwb,
57 65504uwb
59 for (int i = 0; i < 4; ++i)
61 if (s[i] != (_Float16) s_192[i]
62 || u[i] != (_Float16) u_192[i]
63 || (_BitInt(192)) s[i] != s_192[i]
64 || (unsigned _BitInt(192)) u[i] != u_192[i])
65 __builtin_abort ();
67 #endif
68 #if __BITINT_MAXWIDTH__ >= 575
69 static volatile _BitInt(575) s_575[] = {
70 0wb,
71 42wb,
72 -65504wb,
73 65504wb
75 static volatile unsigned _BitInt(575) u_575[] = {
76 0uwb,
77 1uwb,
78 178uwb,
79 65504uwb
81 for (int i = 0; i < 4; ++i)
83 if (s[i] != (_Float16) s_575[i]
84 || u[i] != (_Float16) u_575[i]
85 || (_BitInt(575)) s[i] != s_575[i]
86 || (unsigned _BitInt(575)) u[i] != u_575[i])
87 __builtin_abort ();
89 #endif
90 #endif