Fortran: fix order of checks for the SHAPE intrinsic
authorHarald Anlauf <anlauf@gmx.de>
Thu, 14 Oct 2021 18:18:14 +0000 (20:18 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 14 Oct 2021 18:18:14 +0000 (20:18 +0200)
commit1b115daf62d94337b3d0b2962b0bbbf005a450e0
tree8010fbd211e85d944a268a4c98ef43b058b2b500
parentf0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0
Fortran: fix order of checks for the SHAPE intrinsic

gcc/fortran/ChangeLog:

PR fortran/102716
* check.c (gfc_check_shape): Reorder checks so that invalid KIND
arguments can be detected.

gcc/testsuite/ChangeLog:

PR fortran/102716
* gfortran.dg/shape_10.f90: New test.
gcc/fortran/check.c
gcc/testsuite/gfortran.dg/shape_10.f90 [new file with mode: 0644]