blob: 43791b9e33f7e6adf86b3c22371d09502af044ce [file] [log] [blame]
// { dg-do run }
// { dg-options "-fsanitize=return" }
// { dg-shouldfail "ubsan" }
struct S { S (); ~S (); };
S::S () {}
S::~S () {}
int
foo (int x)
{
S a;
{
S b;
if (x)
return 1;
}
}
int
main ()
{
foo (0);
}
// { dg-output "execution reached the end of a value-returning function without returning a value" }