Be careful about comdat boundary in ICF (PR ipa/82352).
[official-gcc.git] / gcc / testsuite / g++.dg / asan / use-after-scope-types-1.C
blobbedcfa4edb92081b38ee7cc9fade7278d2f66274
1 // { dg-do run }
2 // { dg-shouldfail "asan" }
4 #include "use-after-scope-types.h"
6 int main()
8   using Tests = void (*)();
9   Tests t = &test<bool>;
10   t();
12   return 0;
15 // { dg-output "ERROR: AddressSanitizer: stack-use-after-scope on address.*(\n|\r\n|\r)" }
16 // { dg-output "WRITE of size " }
17 // { dg-output ".*'x' <== Memory access at offset \[0-9\]* is inside this variable.*" }