Debian Codegraph @

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

raw
1 /* { dg-do run { target bitint } } */
2 /* { dg-options "-std=c23 -pedantic-errors" } */
3 /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
4 /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
5
6 #if __BITINT_MAXWIDTH__ >= 1024
7 constexpr _BitInt(1024) d = -541140097068598424394740839221562143161511518875518765552323978870598341733206554363735813878577506997168480201818027232521wb;
8 int c;
9
10 static inline void
11 foo (_BitInt(1024) b, _BitInt(1024) *r)
12 {
13 if (c)
14 b = 0;
15 *r = b;
16 }
17
18 [[gnu::noipa]] void
19 bar (_BitInt(1024) y)
20 {
21 if (y != d)
22 __builtin_abort ();
23 }
24 #endif
25
26 int
27 main ()
28 {
29 #if __BITINT_MAXWIDTH__ >= 1024
30 _BitInt(1024) x;
31 foo (d, &x);
32 bar (x);
33 #endif
34 }