This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix typo in Fortran OpenMP handling (PR fortran/80918)


Hi!

When backporting patches to 5.x, I've noticed a typo that causes us to
diagnose something that shouldn't be diagnosed.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk
and 7.2, queued for 6.x.

2017-06-02  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/80918
	* openmp.c (resolve_omp_clauses): Fix a typo.

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

--- gcc/fortran/openmp.c.jj	2017-05-24 11:59:03.000000000 +0200
+++ gcc/fortran/openmp.c	2017-05-30 11:38:29.905964424 +0200
@@ -4381,7 +4381,7 @@ resolve_omp_clauses (gfc_code *code, gfc
 		    else
 		      resolve_oacc_data_clauses (n->sym, n->where, name);
 		  }
-		else if (list != OMP_CLAUSE_DEPEND
+		else if (list != OMP_LIST_DEPEND
 			 && n->sym->as
 			 && n->sym->as->type == AS_ASSUMED_SIZE)
 		  gfc_error ("Assumed size array %qs in %s clause at %L",
--- gcc/testsuite/gfortran.dg/gomp/pr80918.f90.jj	2017-05-30 12:12:06.254063046 +0200
+++ gcc/testsuite/gfortran.dg/gomp/pr80918.f90	2017-05-30 12:11:56.000000000 +0200
@@ -0,0 +1,10 @@
+! PR fortran/80918
+! { dg-do compile }
+
+subroutine foo (a)
+  integer :: a(*)
+  !$omp task depend(inout:a)
+  !$omp end task
+  !$omp task depend(inout:a)
+  !$omp end task
+end subroutine foo

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]