[PATCH] PR fortran/87851 - [9/10/11/12 Regression] Wrong return type for len_trim

Mikael Morin morin-mikael@orange.fr
Tue Nov 23 11:55:29 GMT 2021

Le 22/11/2021 à 21:30, Bernhard Reutner-Fischer a écrit :
> 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..
> 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.

I prefer not to go that way if possible:
  - because additional flags have a maintenance cost; it’s an additional 
complexity in the core structures, which impacts the whole compiler; 
it’s additional code to set them up, and maintainers have to understand 
what they are for, where they matter and where they don’t.
  - because the flag would have to be set at some point somewhere, which 
would probably be by matching individual functions and argument names; 
so the result would be the same.

You seem to be mostly concerned by the performance penalty, but I think 
4 characters string comparisons at compile time don’t matter in 
practice, as long as there aren’t millions of them.

Regarding the powerpc floating point representation and kind problem, 
let’s see what we need when we really need it. ;-)


More information about the Gcc-patches mailing list