Commit 5f869266 by Thomas Koenig

re PR fortran/77915 (Internal error for matmul() in forall with optimization)

2016-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/77915
	* frontend-passes.c (inline_matmul_assign):  Return early if
	inside a FORALL statement.

2016-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/77915
	* gfortran.dg/matmul_11.f90:  New test.

From-SVN: r240928
parent df48be86
2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/77915
* frontend-passes.c (inline_matmul_assign): Return early if
inside a FORALL statement.
2016-10-07 Fritz Reese <fritzoreese@gmail.com> 2016-10-07 Fritz Reese <fritzoreese@gmail.com>
* interface.c (compare_components): Check charlen for BT_CHAR. * interface.c (compare_components): Check charlen for BT_CHAR.
......
...@@ -2857,6 +2857,11 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -2857,6 +2857,11 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
if (in_where) if (in_where)
return 0; return 0;
/* The BLOCKS generated for the temporary variables and FORALL don't
mix. */
if (forall_level > 0)
return 0;
/* For now don't do anything in OpenMP workshare, it confuses /* For now don't do anything in OpenMP workshare, it confuses
its translation, which expects only the allowed statements in there. its translation, which expects only the allowed statements in there.
We should figure out how to parallelize this eventually. */ We should figure out how to parallelize this eventually. */
......
2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/77915
* gfortran.dg/matmul_11.f90: New test.
2016-10-10 Jiong Wang <jiong.wang@arm.com> 2016-10-10 Jiong Wang <jiong.wang@arm.com>
* gcc.target/aarch64/advsimd-intrinsics/unary_scalar_op.inc: Support FMT64. * gcc.target/aarch64/advsimd-intrinsics/unary_scalar_op.inc: Support FMT64.
......
! { dg-do compile }
! { dg-options "-ffrontend-optimize -fdump-tree-original" }
! PR 77915 - ICE of matmul with forall.
program x
integer, parameter :: d = 3
real,dimension(d,d,d) :: cube,xcube
real, dimension(d,d) :: cmatrix
integer :: i,j
forall(i=1:d,j=1:d)
xcube(i,j,:) = matmul(cmatrix,cube(i,j,:))
end forall
end program x
! { dg-final { scan-tree-dump-times "_gfortran_matmul" 1 "original" } }
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