libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / bitint-10.c
blob4a16bdad7ff51342f6d016dea97d8b9c9caab3ab
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" } { "" } } */
7 #if __BITINT_MAXWIDTH__ >= 135
8 __attribute__((noipa)) void
9 test135 (_BitInt(135) *p)
11 *p = 18514202188641047858083570207027263585014wb;
13 #endif
15 #if __BITINT_MAXWIDTH__ >= 512
16 __attribute__((noipa)) void
17 test512 (_BitInt(512) *p)
19 *p = -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb;
21 #endif
23 int
24 main ()
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