This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix typo in Fortran OpenMP handling (PR fortran/80918)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 2 Jun 2017 09:10:46 +0200
- Subject: [committed] Fix typo in Fortran OpenMP handling (PR fortran/80918)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 85B85C04B31E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 85B85C04B31E
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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