view gcc/testsuite/g++.dg/ubsan/return-6.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// PR c++/77722
// { dg-do run }
// { dg-options "-fsanitize=return -w" }
// { dg-shouldfail "ubsan" }

int
foo ()
{
  int a = 5;
  int b = 5;
}

int
main ()
{
  foo ();
  return 0;
}

// { dg-output "execution reached the end of a value-returning function without returning a value" }