Hi Harald, This is fine for mainline and for backporting if you feel so inclined. Thanks for the patch. Paul On Mon, 16 Jan 2023 at 21:12, Harald Anlauf via Fortran wrote: > Dear all, > > it appears that the fix for pr107874 uncovered a latent bug > for the case of arrays of type character and size zero when > passed to the intrinsics MERGE and SPREAD as SOURCE. In that > case, there is no constructor from which we could obtain > another character length. A reasonable solution seems to > retain the array's character length. > > Since I could not find a simple case where this fails, I've > added an assertion that we actually have a meaningful length. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein