This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix some more decl types in the Fortran frontend
- From: FX <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, bernds at codesourcery dot com, Tobias Burnus <burnus at net-b dot de>
- Date: Thu, 11 Sep 2014 12:37:43 +0200
- Subject: Re: Fix some more decl types in the Fortran frontend
- Authentication-results: sourceware.org; auth=none
Changing the fntype[2] looks wrong to me, as it is also used for powi(double, int) , where the argument order matches the current version:
> gfc_define_builtin ("__builtin_powi", mfunc_double[2],
> BUILT_IN_POWI, "powi", ATTR_CONST_NOTHROW_LEAF_LIST);
(I don’t see any other use of this, but I might be missing something.)
It looks like fntype[5] is actually what you need, and it’s already constructed! However, there is even more mistery here, because it is currently used for __builtin_scalbn, which doesn’t seem right: http://pubs.opengroup.org/onlinepubs/009695399/functions/scalbln.html
So I suspect looking a bit more in depth is required! Also, testcases that excercise this fndecl matching (which you would see fail on ptx) would be a great addition to the testsuite, once you commit (for powi & scalbn, which do not look covered right now, otherwise you would have seen regressions).
Cheers,
FX