1 /* { dg-do run } */ 2 /* { dg-options "-fsanitize=unreachable" } */ 3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */ 4 /* { dg-shouldfail "ubsan" } */ 5 6 static void __attribute__ ((noreturn)) bar()7bar () 8 { 9 } /* { dg-warning "function does return" } */ 10 11 void foo()12foo () 13 { 14 bar (); 15 } 16 17 int main(void)18main (void) 19 { 20 foo (); 21 } 22 23 /* { dg-output "execution reached an unreachable program point" } */ 24