Commit 56a3d28b by Jakub Jelinek Committed by Jakub Jelinek

re PR fortran/70855 (ICE with -fopenmp in gfc_trans_omp_workshare(): Bad statement code)

	PR fortran/70855
	* frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.

	* gfortran.dg/gomp/pr70855.f90: New test.

From-SVN: r236119
parent 3d73ae6e
2016-05-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/70855
* frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
2016-05-09 Richard Biener <rguenther@suse.de> 2016-05-09 Richard Biener <rguenther@suse.de>
PR fortran/70937 PR fortran/70937
......
...@@ -2812,6 +2812,12 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -2812,6 +2812,12 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
if (in_where) if (in_where)
return 0; return 0;
/* For now don't do anything in OpenMP workshare, it confuses
its translation, which expects only the allowed statements in there.
We should figure out how to parallelize this eventually. */
if (in_omp_workshare)
return 0;
expr1 = co->expr1; expr1 = co->expr1;
expr2 = co->expr2; expr2 = co->expr2;
if (expr2->expr_type != EXPR_FUNCTION if (expr2->expr_type != EXPR_FUNCTION
......
2016-05-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/70855
* gfortran.dg/gomp/pr70855.f90: New test.
2016-05-11 Richard Biener <rguenther@suse.de> 2016-05-11 Richard Biener <rguenther@suse.de>
PR middle-end/71002 PR middle-end/71002
......
! PR fortran/70855
! { dg-do compile }
! { dg-additional-options "-O2" }
program pr70855
integer, parameter :: m = 4
integer, parameter :: n = 2
real :: a(m,n)
real :: x(n)
real :: y(m)
a = 1.0
x = 1.0
!$omp parallel
!$omp workshare
y(1:m) = matmul ( a(1:m,1:n), x(1:n) )
!$omp end workshare
!$omp end parallel
end program pr70855
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