re PR fortran/80918 (Assumed size whole array rejected in depend clause)
authorJakub Jelinek <jakub@redhat.com>
Fri, 2 Jun 2017 07:07:29 +0000 (09:07 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 2 Jun 2017 07:07:29 +0000 (09:07 +0200)
PR fortran/80918
* openmp.c (resolve_omp_clauses): Fix a typo.

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

From-SVN: r248812

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

index 08c3ea7b17298e4fc705299406f34abd5259d554..f95fef0580de8ff6818d55697fc988e4fd2a4fce 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/80918
+       * openmp.c (resolve_omp_clauses): Fix a typo.
+
 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
 
        * error.c (gfc_format_decoder): Update for new bool and
index 5a2b774079be0a90627f8e59cd561a426d7c2a8b..2b56558b7c1f9337eddee86afe88658777bd4b38 100644 (file)
@@ -4381,7 +4381,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 a4f3bc933fba04dd24b6fe8e0a885f6463a66313..a111f2b80bcb1ce009879b8b951079fd0075fc21 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/80918
+       * gfortran.dg/gomp/pr80918.f90: New test.
+
 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        * c-c++-common/Wsizeof-pointer-div.c: New test.
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