This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Returning unions (Was: Re: Ping^5: Re: Updated^2: RFA: Fix middle-end/46500 (void * encapsulated))
- From: Joern Rennecke <amylaar at spamcop dot net>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Bernd Schmidt <bernds at codesourcery dot com>, GCC mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 14 Jun 2011 23:27:48 -0400
- Subject: Re: Returning unions (Was: Re: Ping^5: Re: Updated^2: RFA: Fix middle-end/46500 (void * encapsulated))
- References: <20101116234626.u7kpzzukn34kogkk-nzlynne@webmail.spamcop.net> <20101118223203.muhg2uba8gww48co-nzlynne@webmail.spamcop.net> <20110507114245.8rcb4f6n0gggwggk-nzlynne@webmail.spamcop.net> <Pine.LNX.4.64.1105071546350.24964@digraph.polyomino.org.uk> <Pine.LNX.4.64.1105071559200.24964@digraph.polyomino.org.uk> <20110507151225.qsxqm0ltokc4sw0k-nzlynne@webmail.spamcop.net> <20110514103611.vpdb6r7wcgo8wkg0-nzlynne@webmail.spamcop.net> <20110521153014.mkzu2c9qsc808k4g-nzlynne@webmail.spamcop.net> <20110529232655.0ria73pgzkwo008g-nzlynne@webmail.spamcop.net> <20110604092242.4aaut664f4kcsws4-nzlynne@webmail.spamcop.net> <20110614054034.i5n9pysdoo0gsg4-nzlynne@webmail.spamcop.net> <BANLkTikvJyYfh+WV4kuE7WC6Xy2ftiwCyQ@mail.gmail.com> <20110614071614.upci7rx74scwg4ws-nzlynne@webmail.spamcop.net> <BANLkTikPTj=f27sregKhO8gW2MpBLWVKSA@mail.gmail.com> <4DF75131.8040807@codesourcery.com> <20110614085314.jk6v6p7je04s4080-nzlynne@webmail.spamcop.net> <4DF760F2.2080100@codesourcery.co m> <20110614204438.1vu53qgjk0gcs48o-nzlynne@webmail.spamcop.net> <BANLkTikD6=H2qSOn3UW1-EhDk7T-S=FAiw@mail.gmail.com>
Quoting "H.J. Lu" <hjl.tools@gmail.com>:
Do you have a testcase for i386?
struct args { int i0, i1; };
union args_u { struct args *a; } __attribute__((transparent_union));
union args_u
f (union args_u in)
{
union args_u out;
out.a = in.a + 1;
return out;
}