This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: stick addressable constants into the constant pool
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Mon, 02 Aug 2004 15:39:21 -0400
- Subject: Re: stick addressable constants into the constant pool
- References: <20040730230653.GA27003@redhat.com><xypoeltxvn6.fsf@miranda.boston.redhat.com><20040802182626.GA1599@redhat.com>
On Mon, 2 Aug 2004 11:26:26 -0700, Richard Henderson <rth@redhat.com> wrote:
> On Mon, Aug 02, 2004 at 02:06:05PM -0400, Jason Merrill wrote:
>> IIRC it uses fb_either because we can take the address of struct rvalues.
>
> How does that make sense? Perhaps the front end should be creating
> a temporary, which then has its address taken?
This happens in C++ with code like "f().g()", where f returns by value. I
believe it also happens in C, but I don't remember how. I believe that
always making the return slot an explicit temporary would solve all cases.
Are you working on that, or shall I?
Jason