Debian Codegraph @

gcc/testsuite/gcc.dg/dfp/bitint-10.c

raw
1 /* PR middle-end/120631 */
2 /* { dg-do run { target bitint } } */
3 /* { dg-options "-O2" } */
4
5 #if __BITINT_MAXWIDTH__ >= 128
6 _Decimal128 a = 123456789135792468012345678900000000000.0dl;
7 _BitInt(128) b = 123456789135792468012345678900000000000wb;
8 _Decimal64 c = 12345678913579000000000000000000000000.0dd;
9 _BitInt(127) d = 12345678913579000000000000000000000000wb;
10 #endif
11 #if __BITINT_MAXWIDTH__ >= 256
12 _Decimal128 m = 1234567891357924680123456789000000000000000000000000000000000000000000000000.0dl;
13 _BitInt(256) n = 1234567891357924680123456789000000000000000000000000000000000000000000000000wb;
14 _Decimal64 o = 1234567891357900000000000000000000000000000000000000000000000000000000000000.0dd;
15 _BitInt(255) p = 1234567891357900000000000000000000000000000000000000000000000000000000000000wb;
16 #endif
17
18 int
19 main ()
20 {
21 #if __BITINT_MAXWIDTH__ >= 128
22 if (a != b || (_BitInt(128)) a != b || c != d || (_BitInt(127)) c != d)
23 __builtin_abort ();
24 _Decimal128 e = 123456789135792468012345678900000000000.0dl;
25 _BitInt(128) f = 123456789135792468012345678900000000000wb;
26 _Decimal128 g = 123456789135792468012345678900000000000wb;
27 _BitInt(128) h = 123456789135792468012345678900000000000.0dl;
28 _Decimal64 i = 12345678913579000000000000000000000000.0dd;
29 _BitInt(128) j = 12345678913579000000000000000000000000wb;
30 _Decimal64 k = 12345678913579000000000000000000000000wb;
31 _BitInt(128) l = 12345678913579000000000000000000000000.0dd;
32 if (e != g || f != h || i != k || j != l)
33 __builtin_abort ();
34 #endif
35 #if __BITINT_MAXWIDTH__ >= 256
36 if (m != n || (_BitInt(256)) m != n || o != p || (_BitInt(255)) o != p)
37 __builtin_abort ();
38 _Decimal128 q = 1234567891357924680123456789000000000000000000000000000000000000000000000000.0dl;
39 _BitInt(256) r = 1234567891357924680123456789000000000000000000000000000000000000000000000000wb;
40 _Decimal128 s = 1234567891357924680123456789000000000000000000000000000000000000000000000000wb;
41 _BitInt(256) t = 1234567891357924680123456789000000000000000000000000000000000000000000000000.0dl;
42 _Decimal64 u = 1234567891357900000000000000000000000000000000000000000000000000000000000000.0dd;
43 _BitInt(255) v = 1234567891357900000000000000000000000000000000000000000000000000000000000000wb;
44 _Decimal64 w = 1234567891357900000000000000000000000000000000000000000000000000000000000000wb;
45 _BitInt(255) x = 1234567891357900000000000000000000000000000000000000000000000000000000000000.0dd;
46 if (q != s || r != t || u != w || v != x)
47 __builtin_abort ();
48 #endif
49 }