ASAN: emit line information of stack variables.
[official-gcc.git] / gcc / testsuite / g++.dg / asan / use-after-scope-types-4.C
blob7638107d2cca69b1636a66ec81a59be1d70f3c07
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<std::vector<std::string>>;
10   t();
12   return 0;
15 // { dg-output "ERROR: AddressSanitizer: stack-use-after-scope on address.*(\n|\r\n|\r)" }
16 // { dg-output "READ of size " }
17 // { dg-output ".*'x' \\(line 25\\) <== Memory access at offset \[0-9\]* is inside this variable.*" }