Am 22.11.21 um 21:30 schrieb Bernhard Reutner-Fischer via Fortran:
On Mon, 22 Nov 2021 19:17:51 +0100
Harald Anlauf via Gcc-patches <gcc-patc...@gcc.gnu.org> wrote:

Am 21.11.21 um 12:46 schrieb Mikael Morin:
Le 19/11/2021 à 20:47, Harald Anlauf via Fortran a écrit :
Dear Fortranners,

scalariziation of the elemental intrinsic LEN_TRIM was ICEing
when the optional KIND argument was present.

The cleanest solution is to use the infrastructure added by
Mikael's fix for PR97896.  In that case it is a 1-liner.  :-)

I'm just wondering loud if it would be more convenient to have a
unsigned hidden_arg:1 bit in let's say gfc_actual_arglist that denotes
if the argument should be const eval'ed and used before, and, most
importantly not passed to the library. We seem to have more than just
the index intrinsic's kind arg in that boat. And from what i read,
powerpc will eventuall want to select quite some kind-specific library
functions soon, depending on how this part is implemented..

Well, that does not make sense for KIND, which has to be constant.
We even have an appropriate check for this in check.c(kind_check).

And KIND may even select a special library function, which means
that KIND cannot be an ordinary function argument.

Maybe add SPEC_HIDDEN_ARG / SPEC_LIBRARY_SELECTOR additional
gfc_param_spec_type if a separate bit is deemed inappropriate.

Such a hidden_arg/library_selector/non_library_call_arg flag is maybe
better than matching individual functions and strcmp the arg name.

cheers,



Reply via email to