1 /* PR sanitizer/55435 */ 2 /* { dg-do compile } */ 3 4 __attribute__((no_sanitize_address)) int f1(int * p,int * q)5f1 (int *p, int *q) 6 { 7 *p = 42; 8 return *q; 9 } 10 11 void f2 (char *); 12 void f2 (char *) __attribute__((no_sanitize_address)); 13 void f2 (char *) __attribute__((no_sanitize_address)); 14 void f2 (char *); 15 16 void f2(char * p)17f2 (char *p) 18 { 19 *p = 42; 20 } 21 22 void f3 (short *); 23 __typeof (f3) f3 __attribute__((__no_sanitize_address__)); 24 25 void f3(short * p)26f3 (short *p) 27 { 28 *p = 42; 29 } 30 31 __attribute__((no_sanitize_address)) int f4(int * p,int * q)32f4 (int *p, int *q) 33 { 34 *p = 42; 35 return *q; 36 } 37 38 void f5 (char *); 39 void f5 (char *) __attribute__((no_sanitize_address)); 40 void f5 (char *) __attribute__((no_sanitize_address)); 41 void f5 (char *); 42 43 void f5(char * p)44f5 (char *p) 45 { 46 *p = 42; 47 } 48 49 void f6 (short *); 50 __typeof (f6) f6 __attribute__((__no_address_safety_analysis__)); 51 52 void f6(short * p)53f6 (short *p) 54 { 55 *p = 42; 56 } 57 58 int v __attribute__((no_sanitize_address)); /* { dg-warning "attribute ignored" } */ 59 int v2 __attribute__((no_address_safety_analysis)); /* { dg-warning "attribute ignored" } */ 60 61 /* { dg-final { scan-assembler-not "__asan_report_store" } } */ 62 /* { dg-final { scan-assembler-not "__asan_report_load" } } */ 63