1 /* PR sanitizer/79944 */ 2 /* { dg-do run } */ 3 /* { dg-require-effective-target hwaddress_exec } */ 4 5 struct S { int i; char p[1024]; }; 6 7 int main()8main () 9 { 10 struct S *p = (struct S *) __builtin_malloc (__builtin_offsetof (struct S, p) + 64); 11 p->i = 5; 12 asm volatile ("" : "+r" (p) : : "memory"); 13 __atomic_fetch_add ((int *) p, 5, __ATOMIC_RELAXED); 14 asm volatile ("" : "+r" (p) : : "memory"); 15 if (p->i != 10) 16 __builtin_abort (); 17 __builtin_free (p); 18 return 0; 19 } 20