]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: improve check of arguments to the RESHAPE intrinsic
authorHarald Anlauf <anlauf@gmx.de>
Fri, 26 Nov 2021 20:00:35 +0000 (21:00 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 26 Nov 2021 20:00:35 +0000 (21:00 +0100)
commit4d540c7a4a7fb87b04d06e1ee7f9b004116279a4
tree99226378237d96d9f21a76feaa1cf787e53364a6
parentcaa04517e6f78a562f36897a6e7171f0121101b4
Fortran: improve check of arguments to the RESHAPE intrinsic

gcc/fortran/ChangeLog:

PR fortran/103411
* check.c (gfc_check_reshape): Improve check of size of source
array for the RESHAPE intrinsic against the given shape when pad
is not given, and shape is a parameter.  Try other simplifications
of shape.

gcc/testsuite/ChangeLog:

PR fortran/103411
* gfortran.dg/pr68153.f90: Adjust test to improved check.
* gfortran.dg/reshape_7.f90: Likewise.
* gfortran.dg/reshape_9.f90: New test.
gcc/fortran/check.c
gcc/testsuite/gfortran.dg/pr68153.f90
gcc/testsuite/gfortran.dg/reshape_7.f90
gcc/testsuite/gfortran.dg/reshape_9.f90 [new file with mode: 0644]