| 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. |
| 11 |
*/ |
| 12 |
/* { dg-skip-if "" { *-*-* } { "-O0" "-flto" } { "" } } */ |
| 13 |
|
| 14 |
#include "unprotected-allocas-0.c" |
| 15 |
|
| 16 |
/* { dg-final { scan-assembler-not "__hwasan_tag_memory" } } */ |