blob: bdaea60f8097eb2ec770f7dfdb618f4090d4269f [file] [log] [blame]
// PR c++/104642
// With -fsanitize=unreachable we shouldn't optimize away the call to f.
// { dg-do run }
// { dg-shouldfail { *-*-* } }
// { dg-additional-options "-O -fsanitize=unreachable" }
bool b;
int f() {
if (b) return 42;
__builtin_unreachable ();
return 24;
}
int main() { f(); }