[Fortran] Bug 85983 - ICE in check_dtio_interface1, at fortran/interface.c:4748

Message ID 000bb299-ea4f-f063-2c61-c8ad7f2904dd@charter.net
State New
Headers show
Series
  • [Fortran] Bug 85983 - ICE in check_dtio_interface1, at fortran/interface.c:4748
Related show

Commit Message

Jerry June 23, 2018, 2:51 p.m.
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  <jvdelisle@gcc.gnu.org>

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


        if (specific_proc == NULL || specific_proc->is_generic)

Comments

Steve Kargl June 23, 2018, 3:10 p.m. | #1
On Sat, Jun 23, 2018 at 07:51:17AM -0700, Jerry DeLisle wrote:
> 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?

> 


Yes.

-- 
Steve

Patch

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;