blob: dd3b3dbf22505f12063f088821fecd4be44817d0 [file] [log] [blame]
/* PR sanitizer/63316 */
/* { dg-do run } */
/* { dg-require-effective-target hwaddress_exec } */
/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
#ifdef __cplusplus
extern "C" {
#endif
extern void *malloc (__SIZE_TYPE__);
extern void free (void *);
#ifdef __cplusplus
}
#endif
int
main ()
{
int *p = (int *) malloc (sizeof (int));
*p = 3;
asm volatile ("" : : "r" (p) : "memory");
free (p);
return 0;
}