Hi Thomas,
thanks for the reviews!
Harald
Am 26.06.22 um 11:14 schrieb Thomas Koenig via Fortran:
Hello Harald,
compile time simplification of INDEX(str1,str2,back=.true.) gave wrong
results. Looking at gfc_simplify_index, this appeared to be close to
a complete mess, while the runtime library code - which was developed
later - was a relief.
The solution is to use the runtime library code as template to fix this.
I took the opportunity to change string index and length variables
in gfc_simplify_index to HOST_WIDE_INT.
Regtested on x86_64-pc-linux-gnu. OK for mainline?
As this is a wrong-code issue, would this qualify for backports to
open branches?
OK for both.
Thanks for the patch!
Best regards
Thomas