Hello world,
I have just committed the attached patch as obvious, after regtesting.
Regards
Thomas
2018-01-30 Thomas Koenig <[email protected]>
PR fortran/84133
* frontend-passes (matmul_to_var_expr): Return early if
in association list.
(inline_matmul_assign): Likewise.
2018-01-30 Thomas Koenig <[email protected]>
PR fortran/84133
* gfortran.dg/inline_matmul_21.f90: New test case.
Index: frontend-passes.c
===================================================================
--- frontend-passes.c (Revision 257131)
+++ frontend-passes.c (Arbeitskopie)
@@ -2763,7 +2763,7 @@ matmul_to_var_expr (gfc_expr **ep, int *walk_subtr
return 0;
if (forall_level > 0 || iterator_level > 0 || in_omp_workshare
- || in_where)
+ || in_where || in_assoc_list)
return 0;
/* Check if this is already in the form c = matmul(a,b). */
@@ -3728,7 +3728,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt
if (co->op != EXEC_ASSIGN)
return 0;
- if (in_where)
+ if (in_where || in_assoc_list)
return 0;
/* The BLOCKS generated for the temporary variables and FORALL don't
! { dg-do compile }
! { dg-additional-options "-ffrontend-optimize" }
! PR 84133 - this used to ICE. Original test case by
! Gerhard Steinmetz.
program p
real :: x(2,2) = 1.0
real :: z(2,2)
associate (y => matmul(x,x))
z = y
end associate
print *, z
end