* c-c++-common/asan/pr63316.c: Use dg-skip-if instead of dg-options.
[official-gcc.git] / gcc / testsuite / c-c++-common / asan / pr63316.c
blobd243edc8e974bf62025ac11dffc5b6bff7bcf240
1 /* PR sanitizer/63316 */
2 /* { dg-do run } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 extern void *malloc (__SIZE_TYPE__);
9 extern void free (void *);
10 #ifdef __cplusplus
12 #endif
14 int
15 main ()
17 int *p = (int *) malloc (sizeof (int));
18 *p = 3;
19 asm volatile ("" : : "r" (p) : "memory");
20 free (p);
21 return 0;