[PATCH] Fortran : Runtime error, reshape constant array assignment, PR96624
Thu Aug 20 07:05:08 GMT 2020
Please find attached a fix for PR96624. The original patch was by Steve
Also occurs on releases/gcc-10, releases/gcc-9 and releases/gcc-8 branches.
OK to commit to master and backport?
[PATCH] Fortran : Runtime error, reshape constant array assignment PR96624
When assigning a reshaped constant array of shape [2,0] to a
variable fails with an invalid memory access. If a varibale
with the parameter attribute is initialised with the same reshape
there is no runtime error.
2020-08-20 Steven G. Kargl <firstname.lastname@example.org>
* simplify.c (gfc_simplifiy_reshape): Add new variable "zerosize".
Set zerosize if any of the result shape ranks are zero. After
setting the result shapes, if zerosize is set jump to new label
"sizezero". Add label "sizezero" just before clearing index and
2020-08-20 Mark Eggleston <email@example.com>
*gfortran/pr96624.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2552 bytes
Desc: not available
More information about the Gcc-patches