[PATCH] Fix unresolved symbols on non-C99 platforms
Eric Botcazou
ebotcazou@libertysurf.fr
Sun May 22 19:26:00 GMT 2005
> Sorry for the breakage.
No problem.
> I don't understand how using a compiler built-in can put requirements on
> target libraries, but I'll try to be more careful.
A compiler built-in ultimately relies on a generic or back-end specific
expander. For trunc*, it's a back-end expander, whose associated pattern is
named 'btrunc'. See builtins.c:expand_builtin_mathfn:
case BUILT_IN_TRUNC:
case BUILT_IN_TRUNCF:
case BUILT_IN_TRUNCL:
builtin_optab = btrunc_optab; break;
It's a relatively new pattern:
2004-09-04 Uros Bizjak <uros@kss-loka.si>
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L}
using rint_optab.
(expand_builtin): Expand BUILT_IN_RINT{,F,L} using
expand_builtin_mathfn.
* genopinit.c (optabs): Rename trunc_optab to btrunc_optab. Use
btrunc?f patterns for btrunc_optab. Implement rint_optab using
rint?f patterns.
* optabs.c (init_optabs): Initialize rint_optab.
* optabs.h (enum optab_index): Rename OTI_trunc to OTI_btrunc.
Add new OTI_rint.
(btrunc_optab): Rename macro from trunc_optab.
(rint_optab): Define corresponding macro.
Since the SPARC back-end doesn't define this pattern, the built-in piggybacks
on the library function. A quick grep shows that only x86 defines 'btrunc'.
[Uros, would you mind documenting the new standard patterns you have added?]
--
Eric Botcazou
More information about the Fortran
mailing list