[PATCH] PR fortran/103607 - [9/10/11/12 Regression] ICE in do_subscript, at fortran/frontend-passes.c:2927
Harald Anlauf
anlauf@gmx.de
Tue Dec 7 20:43:44 GMT 2021
Dear all,
frontend-passes.c(do_subscript) does a check on array subscripts
which failed for the testcase in the PR where the array spec was
foul: the upper bound finally resolves to a REAL instead of an
INTEGER. (There is another related testcase by Gerhard).
I haven't figured out yet how to kill or fix the array decl in
that case. Nevertheless it makes sense to catch situations in
do_subscript where we end up with illegal types of the bounds.
This is trivially done by the attached patch.
Regtested on x86_64-pc-linux-gnu. OK for mainline/backports?
Thanks,
Harald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fortran-perform-array-subscript-checks-only-for-vali.patch
Type: text/x-patch
Size: 2863 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211207/88a7b5ec/attachment.bin>
More information about the Gcc-patches
mailing list