Be careful about comdat boundary in ICF (PR ipa/82352).
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / pr81212.C
blobce92a07dceb3857aec141fd46d918e2ce1f9a8ec
1 // PR c++/81212
2 // { dg-do compile }
3 // { dg-options "-Wreturn-type -fsanitize=return" }
5 struct S
7   S (void *);
8   void *s;
9 };
12 foo (bool x, void *y)
14   if (x)
15     return S (y);
16 }       // { dg-warning "control reaches end of non-void function" }