diff mbox

[fortran,committed] Fix PR 77915

Message ID 07ab7c6d-e9f7-4f94-688e-28bc0cecf27d@netcologne.de
State New
Headers show

Commit Message

Thomas Koenig Oct. 10, 2016, 2:56 p.m. UTC
Hello world,

I have committed the attached patch to trunk as obvious after
regression-testing. Will commit to gcc6 soon.

Regards

	Thomas

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.
diff mbox

Patch

Index: frontend-passes.c
===================================================================
--- frontend-passes.c	(Revision 240927)
+++ frontend-passes.c	(Arbeitskopie)
@@ -2857,6 +2857,11 @@  inline_matmul_assign (gfc_code **c, int *walk_subt
   if (in_where)
     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
      its translation, which expects only the allowed statements in there.
      We should figure out how to parallelize this eventually.  */