gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-33.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-pre" } */ |
| 3 | |
| 4 | _Bool f1(unsigned x, unsigned y, unsigned *res, int flag, _Bool *t) |
| 5 | { |
| 6 | if (flag) |
| 7 | *t = __builtin_add_overflow(x, y, res); |
| 8 | unsigned res1; |
| 9 | _Bool t1 = __builtin_add_overflow(x, y, &res1); |
| 10 | *res -= res1; |
| 11 | return *t==t1; |
| 12 | } |
| 13 | |
| 14 | /* We should hoist the .ADD_OVERFLOW to before the check. */ |
| 15 | /* { dg-final { scan-tree-dump-times "ADD_OVERFLOW" 1 "pre" } } */ |