Debian Codegraph @

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

raw
1 /* PR middle-end/114313 */
2 /* { dg-do run { target bitint } } */
3 /* { dg-options "-std=c23" } */
4 /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
5 /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
6
7 #if __BITINT_MAXWIDTH__ >= 256
8 struct S { _BitInt(257) : 257; _BitInt(256) b : 182; } s;
9
10 __attribute__((noipa)) _BitInt(256)
11 foo (void)
12 {
13 return s.b;
14 }
15 #endif
16
17 int
18 main ()
19 {
20 #if __BITINT_MAXWIDTH__ >= 256
21 s.b = 1414262180967678524960294186228886540125217087586381431wb;
22 if (foo () != 1414262180967678524960294186228886540125217087586381431wb)
23 __builtin_abort ();
24 s.b = -581849792837428541666755934071828568425158644418477999wb;
25 if (foo () != -581849792837428541666755934071828568425158644418477999wb)
26 __builtin_abort ();
27 #endif
28 }