aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2016-09-10 21:16:45 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2016-09-10 21:16:45 +0000
commit739d93391d50bb0f7d338a5dff5cdcb5ab1c4191 (patch)
tree82afde61b11343ec4a2a7d15853c6b4675dc34d6 /gcc/fortran/interface.c
parentfb7c40dde327fe2729855d1472ed019f6b2e5547 (diff)
downloadgcc-739d93391d50bb0f7d338a5dff5cdcb5ab1c4191.zip
gcc-739d93391d50bb0f7d338a5dff5cdcb5ab1c4191.tar.gz
gcc-739d93391d50bb0f7d338a5dff5cdcb5ab1c4191.tar.bz2
re PR fortran/77532 ([F03] ICE in check_dtio_interface1, at fortran/interface.c:4622)
2016-09-10 Paul Thomas <pault@gcc.gnu.org> Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77532 ^ interface.c (check_dtio_arg_TKR_intent): Return after error. (check_dtio_interface1): Remove asserts, test for NULL and return if found. gfortran.dg/dtio_11.f90: new test. Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org> From-SVN: r240074
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index fece316..45a9afe 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -4559,8 +4559,11 @@ check_dtio_arg_TKR_intent (gfc_symbol *fsym, bool typebound, bt type,
int kind, int rank, sym_intent intent)
{
if (fsym->ts.type != type)
- gfc_error ("DTIO dummy argument at %L must be of type %s",
- &fsym->declared_at, gfc_basic_typename (type));
+ {
+ gfc_error ("DTIO dummy argument at %L must be of type %s",
+ &fsym->declared_at, gfc_basic_typename (type));
+ return;
+ }
if (fsym->ts.type != BT_CLASS && fsym->ts.type != BT_DERIVED
&& fsym->ts.kind != kind)
@@ -4606,20 +4609,23 @@ check_dtio_interface1 (gfc_symbol *derived, gfc_symtree *tb_io_st,
{
/* Typebound DTIO binding. */
tb_io_proc = tb_io_st->n.tb;
- gcc_assert (tb_io_proc != NULL);
+ if (tb_io_proc == NULL)
+ 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;
- gcc_assert (!specific_proc->is_generic);
+ if (specific_proc == NULL || specific_proc->is_generic)
+ return;
dtio_sub = specific_proc->u.specific->n.sym;
}
else
{
generic_proc = tb_io_st->n.sym;
- gcc_assert (generic_proc);
- gcc_assert (generic_proc->generic);
+ if (generic_proc == NULL || generic_proc->generic == NULL)
+ return;
for (intr = tb_io_st->n.sym->generic; intr; intr = intr->next)
{