Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / hwasan / unprotected-allocas-1.c
blob752edc1d3ea366af771936d7680902bad7c1878c
1 /* { dg-do run } */
2 /* { dg-require-effective-target hwaddress_exec } */
3 /* { dg-additional-options "--param hwasan-instrument-allocas=0 -save-temps" } */
4 /* Only test there's no tagging done when not at -O0. Without optimisation
5 the compiler creates a bunch of other variables on the stack other than the
6 vararray/alloca object.
7 We also avoid checking when using -flto, since with LTO the compiler can
8 recognise the vararray is only used with one size and that size is known at
9 compile time -- when the compiler recognises that it instead creates a
10 static array, which gets tagged as is expected but not as the test expects.
12 /* { dg-skip-if "" { *-*-* } { "-O0" "-flto" } { "" } } */
14 #include "unprotected-allocas-0.c"
16 /* { dg-final { scan-assembler-not "__hwasan_tag_memory" } } */