diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-19 08:15:47 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-19 08:15:47 +0000 |
commit | 5c3604f9e8824cdab2611f77898ef9f8a2025809 (patch) | |
tree | 88e897b8431b8cdd2e0e6cf3dc40728adef39e0a /gcc/fortran/check.c | |
parent | 74051031aaae0833759d30e3519bcea03f41f2e0 (diff) | |
download | gcc-5c3604f9e8824cdab2611f77898ef9f8a2025809.tar.gz |
2011-12-19 Tobias Burnus <burnus@net-b.de>
* check.c (coarray_check): Add class ref if needed.
* resolve.c (resolve_fl_var_and_proc,
resolve_fl_derived0, resolve_symbol): Fix checking
for BT_CLASS.
2011-12-19 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_poly_3.f90: New.
* coarray/poly_run_1.f90: Enable some previously commented code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index dca97cba7eb..cb6b94f7f18 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -206,6 +206,14 @@ double_check (gfc_expr *d, int n) static gfc_try coarray_check (gfc_expr *e, int n) { + if (e->ts.type == BT_CLASS && gfc_expr_attr (e).class_ok + && CLASS_DATA (e)->attr.codimension + && CLASS_DATA (e)->as->corank) + { + gfc_add_class_array_ref (e); + return SUCCESS; + } + if (!gfc_is_coarray (e)) { gfc_error ("Expected coarray variable as '%s' argument to the %s " @@ -240,7 +248,7 @@ logical_array_check (gfc_expr *array, int n) static gfc_try array_check (gfc_expr *e, int n) { - if (e->ts.type == BT_CLASS + if (e->ts.type == BT_CLASS && gfc_expr_attr (e).class_ok && CLASS_DATA (e)->attr.dimension && CLASS_DATA (e)->as->rank) { |