Fortran: perform array subscript checks only for valid INTEGER bounds
authorHarald Anlauf <anlauf@gmx.de>
Tue, 7 Dec 2021 20:34:31 +0000 (21:34 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 7 Dec 2021 22:16:18 +0000 (23:16 +0100)
commit9eec77c0df9e5c67454a2e8f83246104458ba4f0
treefa29641998df52565ca039d0d8afe1c1732587e0
parentcf2cd61dce4f5f0cf9d72328396e7f949db18ddb
Fortran: perform array subscript checks only for valid INTEGER bounds

gcc/fortran/ChangeLog:

PR fortran/103607
* frontend-passes.c (do_subscript): Ensure that array bounds are
of type INTEGER before performing checks on array subscripts.

gcc/testsuite/ChangeLog:

PR fortran/103607
* gfortran.dg/pr103607.f90: New test.
gcc/fortran/frontend-passes.c
gcc/testsuite/gfortran.dg/pr103607.f90 [new file with mode: 0644]