Hello Harald,
when simplifying TRANSFER with a MOLD argument of type character
and with SIZE=0 we lose the character length.
This happens in all gfortran versions and results in wrong code.
The purported regression is that at some point in the 9-development
this lead to a (previously possibly latent) ICE.
The attached patch sets up the character length in the typespec and
fixes the ICE. There is another generic hidden/latent problem with
array constructors of size 0 passed to procedures (see e.g. pr86277)
which will remain and is beyond the scope of this fix.
Regtested on x86_64-pc-linux-gnu. I also fixed a minor logic bug
in testcase transfer_simplify_11.f90.
OK for mainline? Backports to branches?
OK for both.
Thanks for the patch!
Regards
Thomas