aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/decl.c15
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 78d40af..418f926 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2017-02-16 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/79382
+ * decl.c (access_attr_decl): Test for presence of generic DTIO
+ interface and emit error if not present.
+
2017-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/79434
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index d3e7e84..52de1c1 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -7568,6 +7568,21 @@ access_attr_decl (gfc_statement st)
case INTERFACE_GENERIC:
case INTERFACE_DTIO:
+
+ if (type == INTERFACE_DTIO
+ && gfc_current_ns->proc_name
+ && gfc_current_ns->proc_name->attr.flavor == FL_MODULE)
+ {
+ gfc_find_symbol (name, gfc_current_ns, 0, &sym);
+ if (sym == NULL)
+ {
+ gfc_error ("The GENERIC DTIO INTERFACE at %C is not "
+ "present in the MODULE '%s'",
+ gfc_current_ns->proc_name->name);
+ return MATCH_ERROR;
+ }
+ }
+
if (gfc_get_symbol (name, NULL, &sym))
goto done;