[RFC] Fix for PR58201

Jan Hubicka hubicka@ucw.cz
Thu Sep 5 08:20:00 GMT 2013


> On 09/04/2013 10:49 AM, Bernd Schmidt wrote:
> >On 09/04/2013 06:04 PM, Jan Hubicka wrote:
> >>this is third fallout of my change to remove DECL_ARGUMENTS/DECL_RESULT for functions w/o
> >>bodies I did not really anticipate.
> >[...]
> >>I would like to basically ask if it seems to make sense to go this route and
> >>try to get rid of those declarations.
> >
> >I'm currently working on a new target, ptx, which uses a
> >pseudo-assembler where functions (even extern ones) need to be declared
> >with their arguments and return types. With my current code I have to
> >look at DECL_ARGUMENTS fairly late in the compilation. I'm not quite
> >sure yet whether the change to delete them will break the backend.
> IIRC the PA had similar requirements as well -- in
> ASM_DECLARE_FUNCTION_NAME we have to peek at DECL_ARGUMENTS so we
> can pass to the assembler & linker which registers hold arguments.

This use should be safe, too. ASM_DECLARE_FUNCTION_NAME is called on function whose
body is being output and there we do have DECL_ARGUMENTS (as we consider them
part of the body)

Honza



More information about the Gcc-patches mailing list