1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */ union U { int i; float f; }; float foo () { union U u; float* f = &u.f; /* { dg-bogus "unions are holy in GCC" } */ u.i = 2; return *f; }