Debian Codegraph @

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

raw
1 /* PR tree-optimization/116224 */
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__ >= 65
8 #define N 65
9 #else
10 #define N 63
11 #endif
12
13 signed char g;
14
15 int
16 foo (signed char c, int i, _BitInt(N) b)
17 {
18 __builtin_memmove (&g, &b, 1);
19 return b / i / c;
20 }
21
22 int
23 main ()
24 {
25 int x = foo (-15, -15, 900);
26 if (x != 4)
27 __builtin_abort ();
28 }