From b93a9a15ee1975ab5aafad34748dec06a74a161d Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Mon, 20 Feb 2017 14:17:42 +0000 Subject: [PATCH] re PR fortran/79599 (typo in diagnostic gfc_error ("DTIO dummy argument at %L be a scalar") 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. From-SVN: r245603 --- gcc/fortran/ChangeLog | 12 ++++++++++++ gcc/fortran/interface.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) 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. */ -- 2.30.2