This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch Ping^2, C++] Move assemble_external call in cp/decl2.c.


Janis Johnson wrote:

> Meanwhile on powerpc64-linux for -m64 it isn't being called when needed;
> see PR 38448, which has a reference to an unreviewed sparc patch for the
> same issue.  Should this kind of thing be fixed in backends instead?

In the medium term, I don't see a reason that either the back ends or
the front ends should be involved, for the most part.  You have to call
assemble_external iff you reference an external symbol, and, with the
exception of magic symbols, the middle end knows about all such references.

In the short term, something like Eric's patch to output_addr_const is
probably reasonable.  My concern with that patch is that it might emit
the external reference too late.  But, I'm not sure about that either way.

The reason I don't think this is the best long-term fix is that I don't
see that the assembly output routines really need to be involved; this
is something that can be computed by walking the tree structure for the
translation unit after optimizations have been performed.  But, that's a
 bit of a truth-and-beauty objection; doing it from the assembly output
routines is probably perfectly workable.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]