2 /* { dg-require-effective-target fstack_protector } */
3 /* { dg-options "-fstack-protector-strong" } */
4 /* { dg-set-target-env-var ASAN_OPTIONS "detect_stack_use_after_return=1" } */
5 /* { dg-shouldfail "asan" } */
7 __attribute__((noinline
))
12 __attribute__((noinline
))
18 __attribute__((noinline
))
22 int main(int argc
, char **argv
) {
27 /* { dg-output "AddressSanitizer: stack-use-after-return on address 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
28 /* { dg-output "WRITE of size 1 at .* thread T0.*" } */
29 /* { dg-output " #0.*(Func2)?.*pr64820.(c:21)?.*" } */
30 /* { dg-output "is located in stack of thread T0 at offset.*" } */
31 /* { dg-output "\'local\' \\(line 14\\) <== Memory access at offset 32 is inside this variable" } */