Re: [PATCH] PR fortran/85130 - Handling of substring range

2021-09-13 Thread Tobias Burnus
Dear Harald, hi all, On 12.09.21 20:40, Harald Anlauf via Fortran wrote: in find_substring_ref we erroneously handled given substring start and end indices as unsigned integers. However, gives indices could be negative, which is legal as long as end < start, leading to a string of length zero.

[PATCH] PR fortran/85130 - Handling of substring range

2021-09-12 Thread Harald Anlauf via Gcc-patches
Dear all, in find_substring_ref we erroneously handled given substring start and end indices as unsigned integers. However, gives indices could be negative, which is legal as long as end < start, leading to a string of length zero. The current behavior could lead to a wrong length as well as an i