From 1c34b140fe4559dea1647c19c39bb83144cd5de5 Mon Sep 17 00:00:00 2001 From: pault Date: Mon, 20 Feb 2017 14:17:42 +0000 Subject: 2017-02-20 Paul Thomas PR fortran/79599 * interface.c (check_dtio_arg_TKR_intent): Supply 'must' missing from error message. 2017-02-20 Paul Thomas PR fortran/79523 * interface.c (gfc_find_typebound_dtio_proc): Guard test for flavor attribute by checking that symbol is resolved. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245603 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 12 ++++++++++++ gcc/fortran/interface.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 418f9267cb0..bd4d971b212 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,15 @@ +2017-02-20 Paul Thomas + + PR fortran/79599 + * interface.c (check_dtio_arg_TKR_intent): Supply 'must' + missing from error message. + +2017-02-20 Paul Thomas + + PR fortran/79523 + * interface.c (gfc_find_typebound_dtio_proc): Guard test for + flavor attribute by checking that symbol is resolved. + 2017-02-16 Paul Thomas PR fortran/79382 diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 5cf02371f80..53701f2e6ef 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -4615,7 +4615,7 @@ check_dtio_arg_TKR_intent (gfc_symbol *fsym, bool typebound, bt type, && rank == 0 && (((type == BT_CLASS) && CLASS_DATA (fsym)->attr.dimension) || ((type != BT_CLASS) && fsym->attr.dimension))) - gfc_error ("DTIO dummy argument at %L be a scalar", + gfc_error ("DTIO dummy argument at %L must be a scalar", &fsym->declared_at); else if (rank == 1 && (fsym->as == NULL || fsym->as->type != AS_ASSUMED_SHAPE)) @@ -4829,7 +4829,7 @@ gfc_find_typebound_dtio_proc (gfc_symbol *derived, bool write, bool formatted) gfc_symtree *tb_io_st = NULL; bool t = false; - if (!derived || derived->attr.flavor != FL_DERIVED) + if (!derived || !derived->resolved || derived->attr.flavor != FL_DERIVED) return NULL; /* Try to find a typebound DTIO binding. */ -- cgit v1.2.1