blob: 54f1c7b5326510ded106547d58e08b5532b881a8 [file] [log] [blame]
// PR c++/104642
// At -O0 and -Og we default to -funreachable-traps
// so the below should abort at runtime.
// { dg-do run }
// { dg-shouldfail { *-*-* } }
// { dg-additional-options "-O0" }
bool b;
int f() {
if (b) return 42;
} // { dg-warning "-Wreturn-type" }
int main() { f(); }