This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix gcc.dg/torture/pr26565.c at -O0 on SPARC/SH
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 May 2006 08:22:45 +0200
- Subject: Re: [PATCH] Fix gcc.dg/torture/pr26565.c at -O0 on SPARC/SH
- References: <Pine.LNX.4.44.0605042226320.1960-100000@www.eyesopen.com>
> 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