Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / hwasan / alloca-outside-caught.c
blob6f3825bee7c4462ab924c07164f3966dd7b34e6f
1 /* { dg-do run } */
2 /* { dg-require-effective-target hwaddress_exec } */
3 /* { dg-shouldfail "hwasan" } */
5 #define alloca __builtin_alloca
7 int __attribute__ ((noinline))
8 check_alloca (int num)
10 volatile int *allocd_array = (int*)alloca (num * sizeof(int));
11 int other_array[10];
12 return allocd_array[12];
15 int __attribute__ ((noinline))
16 main ()
18 check_alloca (3);
19 return 1;
22 /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */
23 /* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/00.* \\(ptr/mem\\) in thread T0.*" } */
24 /* { dg-output "Address 0x\[0-9a-f\]* is located in stack of thread T0.*" } */
25 /* { dg-output "SUMMARY: HWAddressSanitizer: tag-mismatch \[^\n\]*.*" } */