https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92152
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #15) > The following testcase: > union U { long long i; long f; }; > struct a {union U u;}; > struct aa {struct a a;}; > struct b {union U u;}; > struct bb {struct b b;}; > > long > foo (struct bb *bv, void *ptr) > { > struct aa *a = ptr; > struct bb *b = ptr; > bv->b.u.f = 1; > a->a.u.i = 0; > b->b.u.f = 0; > return bv->b.u.f; > } > > int > main () > { > union C {struct aa aa; struct bb bb;} v; > if (foo (&v.bb, &v) != 0) > __builtin_abort (); > return 0; > } > > is misoptimized since GCC 4.6 That is PR93946