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