diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2021-02-16 17:39:49 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2021-02-16 17:39:49 +0100 |
commit | 799478b8914c438f7a33eb319efbae69c81f2111 (patch) | |
tree | 4a6c9bceb761178477d37e7429587d4af16528f8 /gcc/fortran/openmp.c | |
parent | 72d78655a91bb2f89ac4432cfd6374380d6f9987 (diff) | |
download | gcc-799478b8914c438f7a33eb319efbae69c81f2111.zip gcc-799478b8914c438f7a33eb319efbae69c81f2111.tar.gz gcc-799478b8914c438f7a33eb319efbae69c81f2111.tar.bz2 |
Fortran: %re/%im fixes for OpenMP/OpenACC + gfc_is_simplify_contiguous
gcc/fortran/ChangeLog:
* expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
%im and %re which are EXPR_VARIABLE.
* openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
gcc/testsuite/ChangeLog:
* gfortran.dg/goacc/ref_inquiry.f90: New test.
* gfortran.dg/gomp/ref_inquiry.f90: New test.
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r-- | gcc/fortran/openmp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index aab17f0..1e541eb 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -5218,6 +5218,14 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, && array_ref->next->type == REF_SUBSTRING))) gfc_error ("Unexpected substring reference in %s clause " "at %L", name, &n->where); + else if (array_ref && array_ref->type == REF_INQUIRY) + { + gcc_assert (array_ref->u.i == INQUIRY_RE + || array_ref->u.i == INQUIRY_IM); + gfc_error ("Unexpected complex-parts designator " + "reference in %s clause at %L", + name, &n->where); + } else if (!resolved || n->expr->expr_type != EXPR_VARIABLE || array_ref->next |