aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr63839.c
blob: f0cffa6cf7b0abd6cb5f96df1099c6db286f35f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do run } */
/* { dg-options "-fsanitize=unreachable" } */
/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
/* { dg-shouldfail "ubsan" } */

static void __attribute__ ((noreturn))
bar ()
{
} /* { dg-warning "function does return" } */

void
foo ()
{
  bar ();
}

int
main (void)
{
  foo ();
}

/* { dg-output "execution reached an unreachable program point" } */