This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] PR18683: Bad C++/cgraph/middle-end/rs6000 interaction(fix 1)


Roger Sayle wrote:

If the above assumptions are true, the routines push_function_context
and pop_function_context used by the front-ends should have no affect
on the RTL optimizers internal data structures.

Yes. In the old days, we really used to be generating RTL for multiple functions at once, but we should certainly not be doing that any more.


In addition to this change, I'll also submit another change to the
rs6000 backend that is also sufficient to resolve the failure.  However
both of these fixes may possibly be papering over a more fundamental
problem in the interaction between g++ and cgraph; should we guarantee
that current_function_decl has an assembler name before generating RTL?

Definitely not; DECL_ASSEMBLER_NAME is supposed to operate lazily. Unfortunately, in obscure situations, the C++ front end does end up doing complex things during mangling; see the comments around save_partially_mangled_name. A large part of that complexity is imposed upon us by the C++ ABI, but we could probably figure out a way to do better.


Ok for mainline?

Yes.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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