https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460

--- Comment #19 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #18)
> (In reply to rguent...@suse.de from comment #17)
> > But this also hints at the ABI for
> > 
> > void foo (union U { int x; float y; });
> > 
> > changing with the patch, no?  Or ultimatively at the FE using a bogus
> > check to verify ABI compatibility (just looking at TYPE_MODE).

Following test doesn't compile with patched compiler:

--cut here--
union U { int x; float y; } __attribute__ ((transparent_union));

void foo (union U);

void test (void)
{
  union U t;

  foo (1.0f);

  foo (1);
}
--cut here--

-O2 -mfpmath=387 -m32:

union.c:1:7: warning: union cannot be made transparent
 union U { int x; float y; } __attribute__ ((transparent_union));

but does compile OK with:

-msse -O2 -mfpmath=sse -m32

Reply via email to