2 // { dg-shouldfail "asan" }
8 const IntHolder *saved;
10 void save(const IntHolder &holder) {
14 int main(int argc, char *argv[]) {
16 int x = saved->val; // BOOM
20 // { dg-output "ERROR: AddressSanitizer: stack-use-after-scope on address.*(\n|\r\n|\r)" }
21 // { dg-output "READ of size 4 at.*" }
22 // { dg-output ".*'<unknown>' <== Memory access at offset \[0-9\]* is inside this variable.*" }