1 /* { dg-do compile } */ 2 /* { dg-additional-options "--param hwasan-instrument-reads=0" } */ 3 4 typedef __SIZE_TYPE__ size_t; 5 /* Particular code doesn't really matter, the requirement is that it has both 6 loads and stores in it. */ 7 __attribute__ ((noinline)) reader(int * array,size_t num)8int reader (int *array, size_t num) 9 { 10 return array[num]; 11 } 12 13 int __attribute__ ((noinline)) writer(int * array,size_t num,int value)14writer (int *array, size_t num, int value) 15 { 16 array[num] = value; 17 return num + value; 18 } 19 20 /* { dg-final { scan-assembler-not "__hwasan_load" } } */ 21 /* { dg-final { scan-assembler "__hwasan_store" } } */ 22