Debian Codegraph @

gcc/testsuite/gcc.dg/pr112760.c

raw
1 /* PR rtl-optimization/112760 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fno-dce -fno-guess-branch-probability --param=max-cse-insns=0" } */
4 /* { dg-additional-options "-m8bit-idiv -mavx" { target i?86-*-* x86_64-*-* } } */
5
6 unsigned g;
7
8 __attribute__((__noipa__)) unsigned short
9 foo (unsigned short a, unsigned short b)
10 {
11 unsigned short x = __builtin_add_overflow_p (a, g, (unsigned short) 0);
12 g -= g / b;
13 return x;
14 }
15
16 int
17 main ()
18 {
19 unsigned short x = foo (40, 6);
20 if (x != 0)
21 __builtin_abort ();
22 }