Debian Codegraph @

gcc/testsuite/g++.dg/ubsan/return-6.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 int a = 5;
10 int b = 5;
11 }
12
13 int
14 main ()
15 {
16 foo ();
17 return 0;
18 }
19
20 // { dg-output "execution reached the end of a value-returning function without returning a value" }