blob: 4a16bdad7ff51342f6d016dea97d8b9c9caab3ab (
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
|
/* PR c/102989 */
/* { dg-do run { target bitint } } */
/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
#if __BITINT_MAXWIDTH__ >= 135
__attribute__((noipa)) void
test135 (_BitInt(135) *p)
{
*p = 18514202188641047858083570207027263585014wb;
}
#endif
#if __BITINT_MAXWIDTH__ >= 512
__attribute__((noipa)) void
test512 (_BitInt(512) *p)
{
*p = -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb;
}
#endif
int
main ()
{
#if __BITINT_MAXWIDTH__ >= 135
_BitInt(135) b135;
test135 (&b135);
if (b135 != 18514202188641047858083570207027263585014wb)
__builtin_abort ();
#endif
#if __BITINT_MAXWIDTH__ >= 512
_BitInt(512) b512;
test512 (&b512);
if (b512 != -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb)
__builtin_abort ();
#endif
}
|