aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-12-21 17:16:20 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-12-21 17:16:20 +0100
commit4e2044d68d06c85761edf7510e23ea06c9279fdb (patch)
tree0489f66765bb50a8111ffa72c243ca6d9d23aa9b /gcc/fortran/openmp.c
parent5878034e0363e116f8f2fca4ee8cf2c24cb1e35c (diff)
downloadgcc-4e2044d68d06c85761edf7510e23ea06c9279fdb.zip
gcc-4e2044d68d06c85761edf7510e23ea06c9279fdb.tar.gz
gcc-4e2044d68d06c85761edf7510e23ea06c9279fdb.tar.bz2
re PR fortran/78866 (ICE in gimplify_adjust_omp_clauses_1, at gimplify.c:8721)
PR fortran/78866 * openmp.c (resolve_omp_clauses): Diagnose assumed size arrays in OpenMP map, to and from clauses. * trans-openmp.c: Include diagnostic-core.h, temporarily redefining GCC_DIAG_STYLE to __gcc_tdiag__. (gfc_omp_finish_clause): Diagnose implicitly mapped assumed size arrays. * gfortran.dg/gomp/map-1.f90: Add expected error. * gfortran.dg/gomp/pr78866-1.f90: New test. * gfortran.dg/gomp/pr78866-2.f90: New test. From-SVN: r243860
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 11ffb5d..da44991 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -4382,6 +4382,11 @@ 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
+ && n->sym->as
+ && n->sym->as->type == AS_ASSUMED_SIZE)
+ gfc_error ("Assumed size array %qs in %s clause at %L",
+ n->sym->name, name, &n->where);
if (list == OMP_LIST_MAP && !openacc)
switch (code->op)
{