Debian Codegraph @

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

raw
1 /* PR c/102989 */
2 /* { dg-do run { target bitint } } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
4 /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
5 /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
6
7 #if __BITINT_MAXWIDTH__ >= 135
8 __attribute__((noipa)) void
9 test135 (_BitInt(135) *p)
10 {
11 *p = 18514202188641047858083570207027263585014wb;
12 }
13 #endif
14
15 #if __BITINT_MAXWIDTH__ >= 512
16 __attribute__((noipa)) void
17 test512 (_BitInt(512) *p)
18 {
19 *p = -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb;
20 }
21 #endif
22
23 int
24 main ()
25 {
26 #if __BITINT_MAXWIDTH__ >= 135
27 _BitInt(135) b135;
28 test135 (&b135);
29 if (b135 != 18514202188641047858083570207027263585014wb)
30 __builtin_abort ();
31 #endif
32 #if __BITINT_MAXWIDTH__ >= 512
33 _BitInt(512) b512;
34 test512 (&b512);
35 if (b512 != -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb)
36 __builtin_abort ();
37 #endif
38 }