blob: 7eaded035ae32d63c8b89f5527d546c97bf96cf6 [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 "-Og" }
bool b;
int f() {
if (b) return 42;
} // { dg-warning "-Wreturn-type" }
int main() { f(); }