aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2017-10-07 11:43:58 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2017-10-07 11:43:58 +0000
commita4792d44311895bef287eb9632a1d4936ca8eafb (patch)
tree1e150f3f71f1ff5c5c477a2e6ec7772f6630b939 /gcc/fortran/resolve.c
parente923330e1bc5401844a5969f1fd0dab3cd985095 (diff)
downloadgcc-a4792d44311895bef287eb9632a1d4936ca8eafb.zip
gcc-a4792d44311895bef287eb9632a1d4936ca8eafb.tar.gz
gcc-a4792d44311895bef287eb9632a1d4936ca8eafb.tar.bz2
gfortran.h (async_io_dt): Add external reference.
2017-10-07 Thomas Koenig <tkoenig@gcc.gnu.org> * gfortran.h (async_io_dt): Add external reference. * io.c (async_io_dt): Add variable. (compare_to_allowed_values): Add prototyte. Add optional argument num. If present, set it to the number of the entry that was matched. (check_io_constraints): If this is for an asynchronous I/O statement, set async_io_dt and set the asynchronous flag for a SIZE tag. * resolve.c (resolve_transfer): If async_io_dt is set, set the asynchronous flag on the variable. (resolve_fl_namelist): If async_io_dt is set, set the asynchronous flag on all elements of the namelist. From-SVN: r253508
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index e6f95d5..fab7c23 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -9196,6 +9196,9 @@ resolve_transfer (gfc_code *code)
"an assumed-size array", &code->loc);
return;
}
+
+ if (async_io_dt && exp->expr_type == EXPR_VARIABLE)
+ exp->symtree->n.sym->attr.asynchronous = 1;
}
@@ -14079,6 +14082,11 @@ resolve_fl_namelist (gfc_symbol *sym)
}
}
+ if (async_io_dt)
+ {
+ for (nl = sym->namelist; nl; nl = nl->next)
+ nl->sym->attr.asynchronous = 1;
+ }
return true;
}