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