Message ID | 12d02ff7-b6ca-cfca-3fce-ef3b13bcfda5@netcologne.de |
---|---|
State | New |
Headers | show |
Series | [fortran] Fix PR 68426, simplification of SPREAD | expand |
On Wed, Jan 09, 2019 at 12:11:12AM +0100, Thomas Koenig wrote: > > the attached patch fixes the PR by simpliy having gfc_simplify_spread > also do its job when there's an EXPR_STRUCTURE. The code to correctly > handle that case was already in place, it just was not run for that > case. > > Regression-tested. OK for trunk? > Yes.
Index: simplify.c =================================================================== --- simplify.c (Revision 267737) +++ simplify.c (Arbeitskopie) @@ -7572,7 +7572,8 @@ gfc_simplify_spread (gfc_expr *source, gfc_expr *d return NULL; } - if (source->expr_type == EXPR_CONSTANT) + if (source->expr_type == EXPR_CONSTANT + || source->expr_type == EXPR_STRUCTURE) { gcc_assert (dim == 0);