From: Jakub Jelinek Date: Fri, 2 Jun 2017 07:07:29 +0000 (+0200) Subject: re PR fortran/80918 (Assumed size whole array rejected in depend clause) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aad16012aa3bd5fe1c019bac5dc1c71537c5431c;p=gcc.git re PR fortran/80918 (Assumed size whole array rejected in depend clause) PR fortran/80918 * openmp.c (resolve_omp_clauses): Fix a typo. * gfortran.dg/gomp/pr80918.f90: New test. From-SVN: r248812 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 08c3ea7b172..f95fef0580d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2017-06-02 Jakub Jelinek + + PR fortran/80918 + * openmp.c (resolve_omp_clauses): Fix a typo. + 2017-05-30 David Malcolm * error.c (gfc_format_decoder): Update for new bool and diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 5a2b774079b..2b56558b7c1 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -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", diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a4f3bc933fb..a111f2b80bc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-06-02 Jakub Jelinek + + PR fortran/80918 + * gfortran.dg/gomp/pr80918.f90: New test. + 2017-06-02 Bernd Edlinger * 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 index 00000000000..6c5b4d84e8c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/pr80918.f90 @@ -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