| 1 |
/* PR sanitizer/85213 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* Pass -gno-statement-frontiers to work around |
| 4 |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100733 : |
| 5 |
without it the IR coming from the front end may be different with and without |
| 6 |
debug information turned on. That may cause e.g., different discriminator values |
| 7 |
and -fcompare-debug failures. */ |
| 8 |
/* { dg-options "-O1 -fsanitize=undefined -fcompare-debug -gno-statement-frontiers" } */ |
| 9 |
|
| 10 |
int |
| 11 |
foo (int x) |
| 12 |
{ |
| 13 |
return (__builtin_expect (({ x != 0; }) ? 0 : 1, 3) == 0) * -1 << 0; |
| 14 |
} |