This patch is simple, eliminates an assert and allows further processing to give reasonable diagnostics.

Regression tested.

I don't think we really need a test case, but I can add one of the cases from the PR.

OK for trunk?

Regards,

Jerry


2018-06-23  Jerry DeLisle  <jvdeli...@gcc.gnu.org>

        PR fortran/85983
        * interface.c (check_dtio_interface1): Delete assert.


diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index eafc419ef3a..9da654e65d5 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -4763,7 +4763,6 @@ check_dtio_interface1 (gfc_symbol *derived, gfc_symtree *tb_io_st,
        return;

       gcc_assert (tb_io_proc->is_generic);
-      gcc_assert (tb_io_proc->u.generic->next == NULL);

       specific_proc = tb_io_proc->u.generic->specific;
       if (specific_proc == NULL || specific_proc->is_generic)

Reply via email to