public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix typo in Fortran OpenMP handling (PR fortran/80918)
@ 2017-06-02  7:10 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2017-06-02  7:10 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-02  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02  7:10 [committed] Fix typo in Fortran OpenMP handling (PR fortran/80918) Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).