Debian Codegraph @

gcc/testsuite/g++.dg/ubsan/return-4.C

raw
1 // PR c++/77722
2 // { dg-do run }
3 // { dg-options "-fsanitize=return -w" }
4 // { dg-shouldfail "ubsan" }
5
6 int
7 foo ()
8 {
9 }
10
11 int
12 main ()
13 {
14 foo ();
15 return 0;
16 }
17
18 // { dg-output "execution reached the end of a value-returning function without returning a value" }