blob: c033abfd69b4b0bdd9b226c34fa467b448d23460 [file] [log] [blame]
/* PR sanitizer/85774 */
/* { dg-do run } */
#include <functional>
void
DoSomething ()
{
}
void
DoFunc (const std::function<void(void)> &func)
{
func ();
}
void
Setup ()
{
switch (1)
{
case 1:
{
DoFunc ([]() {});
break;
}
case 2:
{
DoFunc ([]() {});
break;
}
default:
break;
}
DoSomething ();
}
void
DemostrateBadPoisoning ()
{
DoFunc ([]() {});
}
int
main ()
{
Setup ();
DemostrateBadPoisoning ();
return 0;
}