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] Fix gcc.dg/torture/pr26565.c at -O0 on SPARC/SH


> Hmm.  I think that this is still the best way to go, but that we'll
> also need to tweak c-pragma:maybe_apply_renaming_pragma to avoid the
> above fallout; complaining about DECL_ASSEMBLER_SET_P.

I'm personally not so sure, because in my opinion the statement

  if (both_p
      && !flag_no_builtin && !builtin_function_disabled_p (libname)
      && !(nonansi_p && flag_no_nonansi_builtin))
    lang_hooks.builtin_function (libname, libtype, fncode, fnclass,
				 (fallback_p ? libname : NULL),
				 fnattrs);

would abuse a little the langhook

  /* Return a definition for a builtin function named NAME and whose data type
     is TYPE.  TYPE should be a function type with argument types.
     FUNCTION_CODE tells later passes how to compile calls to this function.
     See tree.h for its possible values.

     If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
     the name to be called if we can't opencode the function.  If
     ATTRS is nonzero, use that for the function's attribute list.  */
  tree (*builtin_function) (const char *name, tree type, int function_code,
			    enum built_in_class bt_class,
			    const char *library_name, tree attrs);


It would seem more consistent to have assemble_external always set the 
DECL_ASSEMBLER_NAME, whatever the platform, but probably using something more 
polished than the kludge I posted.

-- 
Eric Botcazou


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