Commit dca9e8be by Thomas Koenig

re PR fortran/84133 (ICE in gimplify_var_or_parm_decl, at gimplify.c:2706)

2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/84133
	* frontend-passes (matmul_to_var_expr): Return early if
	in association list.
	(inline_matmul_assign): Likewise.

2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/84133
	* gfortran.dg/inline_matmul_21.f90: New test case.

From-SVN: r257206
parent 881f7c97
2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84133
* frontend-passes (matmul_to_var_expr): Return early if
in association list.
(inline_matmul_assign): Likewise.
2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org> 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84073 PR fortran/84073
......
...@@ -2763,7 +2763,7 @@ matmul_to_var_expr (gfc_expr **ep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -2763,7 +2763,7 @@ matmul_to_var_expr (gfc_expr **ep, int *walk_subtrees ATTRIBUTE_UNUSED,
return 0; return 0;
if (forall_level > 0 || iterator_level > 0 || in_omp_workshare if (forall_level > 0 || iterator_level > 0 || in_omp_workshare
|| in_where) || in_where || in_assoc_list)
return 0; return 0;
/* Check if this is already in the form c = matmul(a,b). */ /* Check if this is already in the form c = matmul(a,b). */
...@@ -3728,7 +3728,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -3728,7 +3728,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
if (co->op != EXEC_ASSIGN) if (co->op != EXEC_ASSIGN)
return 0; return 0;
if (in_where) if (in_where || in_assoc_list)
return 0; return 0;
/* The BLOCKS generated for the temporary variables and FORALL don't /* The BLOCKS generated for the temporary variables and FORALL don't
......
2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84133
* gfortran.dg/inline_matmul_21.f90: New test case.
2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++.dg/torture/pr81360.C: Add -fdump-ipa-icf to dg-options. * g++.dg/torture/pr81360.C: Add -fdump-ipa-icf to dg-options.
......
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment