ASAN: emit line information of stack variables.
[official-gcc.git] / gcc / testsuite / g++.dg / asan / use-after-scope-types-1.C
blob180804ca81ddf49d9a155a084383c63b58ab85d9
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' \\(line 25\\) <== Memory access at offset \[0-9\]* is inside this variable.*" }