[PATCH] Fortran: ICE in character(kind=4) deferred-length array reference [PR121939]

Jerry D jvdelisle2@gmail.com
Wed Sep 24 22:02:21 GMT 2025


On 9/24/25 11:56 AM, Harald Anlauf wrote:
> Dear All,
> 
> debugging this PR sent me deep into the woods.  To find where things
> went wrong, I ran two parallel gdb sessions on a testcase once with
> character(kind=1) and with character(kind=4), and found that the
> code diverged in get_array_span, as the TYPE_STRING_FLAG was set
> for the former but not set for the latter.
> 
> I did not find why it was set at all for the former, but decided
> that it should be set for all character types.  That fixed it.
> (If someone thinks that I am wrong, please speak up!)
> 
> This allowed to disable the temporary workarounds I put in
> testcase deferred_character_39.f90, so this should guarantee
> that the present fix works and does not break something obvious.
> 
> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
> 
> And for joint backport with the fix for pr108581 to 15-branch?
> 
> Thanks,
> Harald
> 

Yes, OK and for backport.

Thanks,

Jerry


More information about the Fortran mailing list