gcc/testsuite/gcc.target/i386/pr66112-1.c
raw| 1 | /* PR target/66112 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | |
| 5 | unsigned int |
| 6 | foo (long long a, long long b) |
| 7 | { |
| 8 | unsigned int res; |
| 9 | a &= ~0U; |
| 10 | b &= ~0U; |
| 11 | if (__builtin_mul_overflow (a, b, &res)) |
| 12 | res = 0x123U; |
| 13 | return res; |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-assembler "jn?o\[ \t\]" } } */ |