]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR fortran/80918 (Assumed size whole array rejected in depend clause)
authorJakub Jelinek <jakub@redhat.com>
Thu, 22 Jun 2017 11:09:58 +0000 (13:09 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 22 Jun 2017 11:09:58 +0000 (13:09 +0200)
Backported from mainline
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.

From-SVN: r249507

gcc/fortran/ChangeLog
gcc/fortran/openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr80918.f90 [new file with mode: 0644]

index 5fb3b2f154cdbaba6b36c2d4437662d20c5cd560..175e5d729bead3041efb600c9cd7f5de1cee99b4 100644 (file)
@@ -1,3 +1,11 @@
+2017-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2017-06-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/80918
+       * openmp.c (resolve_omp_clauses): Fix a typo.
+
 2017-06-09  Janus Weil  <janus@gcc.gnu.org>
 
        Backport from trunk
index bd8e66c03da4c9092226572dc8b1b3fe3c4af279..d5fb45765e3317bc4ee1443df3283e159b8b2b1c 100644 (file)
@@ -3530,7 +3530,7 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
                    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",
index 4d3ede6753bf0d885b8fc9d508901ca40dade6eb..671483dfcce6ddea2c565d40e7e2b4f5db473d4a 100644 (file)
@@ -1,3 +1,11 @@
+2017-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2017-06-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/80918
+       * gfortran.dg/gomp/pr80918.f90: New test.
+
 2017-06-22  Richard Biener  <rguenther@suse.de>
 
        Backport from mainline
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr80918.f90 b/gcc/testsuite/gfortran.dg/gomp/pr80918.f90
new file mode 100644 (file)
index 0000000..6c5b4d8
--- /dev/null
@@ -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