aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2011-04-23 12:26:38 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2011-04-23 12:26:38 +0200
commitc49eaa233a65b956f0bf07be4b6d65ae7e934143 (patch)
treed725eeee3661c9060948a73ac3731d9ad58d3102 /gcc/fortran/module.c
parent16997bc01128f46cee9450237cd5e3e8fb3b12ad (diff)
downloadgcc-c49eaa233a65b956f0bf07be4b6d65ae7e934143.zip
gcc-c49eaa233a65b956f0bf07be4b6d65ae7e934143.tar.gz
gcc-c49eaa233a65b956f0bf07be4b6d65ae7e934143.tar.bz2
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-04-23 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * module.c (mio_array_spec): Set as->cotype on reading. * resolve.c (resolve_allocate_expr): Fix allocating coarray components. 2011-04-23 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_19.f90: New. From-SVN: r172897
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 42e8e00..fb8de0e 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -2203,6 +2203,9 @@ mio_array_spec (gfc_array_spec **asp)
mio_integer (&as->corank);
as->type = MIO_NAME (array_type) (as->type, array_spec_types);
+ if (iomode == IO_INPUT && as->corank)
+ as->cotype = (as->type == AS_DEFERRED) ? AS_DEFERRED : AS_EXPLICIT;
+
for (i = 0; i < as->rank + as->corank; i++)
{
mio_expr (&as->lower[i]);