[9/10 Regression, fortran, patch] ICE in simplify_findloc_nodim, at fortran/simplify.c:5513
Mark Eggleston
mark.eggleston@codethink.co.uk
Mon Feb 24 12:24:00 GMT 2020
Please find attached a patch to fix PR93835. This patch ensures that the
array returned by SHAPE has its shape defined, the original patch from
Steve Kargl handled the lack of shape for the returned array.
The bonus white space issues fixed in the original patch have been retained.
A side affect of the patch is a change in the errors expected by the
test case pr77351.f90. Instead of "Error: Different shape for elemental
binary operation at (1) on dimension 1 (1 and 2)" and "Error: Array
operands are incommensurate at (1)" there is only "Error: Shapes for
operands at (1) and (2) are not conformable" which is effectively the same.
gcc/fortran/ChangeLog
   Mark Eggleston <mark.eggleston@codethink.com>
   Steven G. Kargl <kargl@gcc.gnu.org>
   PR fortran/93835
   * decl.c (gfc_match_data) : Check whether the data expression
   is a derived type and is a constructor. If a BOZ constant
   is encountered in the constructor output an error and return
   MATCH_ERROR.
gcc/testsuite/ChangeLog
   Mark Eggleston <mark.eggleston@codethink.com>
   PR fortran/93835
   * gfortran.dg/pr77351.f90 : Check for one error instead of two.
   * gfortran.dg/pr93835.f08 : New test.
--
https://www.codethink.co.uk/privacy.html
--
https://www.codethink.co.uk/privacy.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fortran-ICE-using-SHAPE-with-FINDLOC-PR93835.patch
Type: text/x-patch
Size: 3724 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200224/6eb04b48/attachment.bin>
More information about the Gcc-patches
mailing list