1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler "dont_delete" } } */ typedef struct { int x; } __attribute__((may_alias)) S; extern void dont_delete (void); void f(S *s, float *f) { s->x = 1; *f = 0; if (s->x != 1) dont_delete (); }