Debian Codegraph @

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

raw
1 /* PR tree-optimization/114040 */
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__ >= 8671
8 __attribute__((noipa)) unsigned
9 foo (unsigned _BitInt(8671) x, unsigned y, unsigned _BitInt(512) z)
10 {
11 unsigned _BitInt (8671) r
12 = x * __builtin_sub_overflow_p (y * z, 0, (unsigned _BitInt(255)) 0);
13 return r;
14 }
15 #endif
16
17 int
18 main ()
19 {
20 #if __BITINT_MAXWIDTH__ >= 8671
21 if (foo (1, 1, 0xfffa46471e7c2dd60000000000000000wb))
22 __builtin_abort ();
23 #endif
24 }