Scalarization of simplification of constant expressions?

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Oct 6 05:44:23 GMT 2020


Hi Harald,

Yes, there is a scalarizer for elemental calls:
expr.c(scalarize_intrinsic_call) first appears in 2007.

Cheers

Paul


On Mon, 5 Oct 2020 at 20:59, Harald Anlauf <anlauf@gmx.de> wrote:

> Dear all,
>
> the restrictions on what can be used in constant expressions have been
> greatly reduced in F2018, so one might want to simplify more than what
> was possible before.
>
> E.g. the following is currently not simplified at compile time:
>
>   print *, index('abcd',['c'], .true. )
>   print *, index('abcd', 'b' ,[.true.])
>
> c.f. PR95979, while the scalar variants do simplify.
>
> Is there something like scalarization also available for simplification
> of constant expressions?
>
> Regards,
> Harald
>
>

-- 
"If you can't explain it simply, you don't understand it well enough" -
Albert Einstein


More information about the Fortran mailing list