[patch, fortran] Fix PR 56342, matmul was not simplified
Thomas Koenig
tkoenig@netcologne.de
Sun Oct 22 17:39:00 GMT 2017
Hello world,
the attached patch fixes the PR by calling gfc_simplify_expr for
parameter arrays, which do not yet appear to simplified completely
by the time they reach gfc_simplify_matmul.
I suspect this will also fix some more simplification issues, but I
didn't search for other cases.
Regression-tested. OK for trunk?
Regards
Thomas
2017-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56342
* simplify.c (is_constant_array_expr): If the expression is
a parameter array, call gfc_simplify_expr.
2017-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56342
* gfortran.dg/matmul_const.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171022/5aa84563/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matmul_const.f90
Type: text/x-fortran
Size: 438 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171022/5aa84563/attachment-0001.bin>
More information about the Fortran
mailing list