From: Dominique d'Humieres Date: Fri, 24 Feb 2017 23:40:42 +0000 (+0100) Subject: re PR fortran/79597 (Incomplete error message "Expecting % PR fortran/79597 * interface.c (gfc_match_end_interface): Remove spurious comma and space, replace 'got %s' with 'got %qs'. 2017-02-25 Dominique d'Humieres PR fortran/79597 * gfortran.dg/dtio_6.f90: Update test. 2017-02-25 Dominique d'Humieres PR fortran/79601 * interface.c (check_dtio_arg_TKR_intent): Change 'intent' to 'INTENT'. 2017-02-25 Dominique d'Humieres PR fortran/79601 * gfortran.dg/interface_operator_2.f90: New test. From-SVN: r245729 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index bd4d971b212..6ee14745adf 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,15 @@ +2017-02-25 Dominique d'Humieres + + PR fortran/79601 + * interface.c (check_dtio_arg_TKR_intent): Change 'intent' + to 'INTENT'. + +2017-02-25 Dominique d'Humieres + + PR fortran/79597 + * interface.c (gfc_match_end_interface): Remove spurious comma + and space, replace 'got %s' with 'got %qs'. + 2017-02-20 Paul Thomas PR fortran/79599 diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 53701f2e6ef..80dae027da0 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -398,10 +398,10 @@ gfc_match_end_interface (void) m = MATCH_ERROR; if (strcmp(s2, "none") == 0) gfc_error ("Expecting % " - "at %C, ", s1); + "at %C", s1); else gfc_error ("Expecting % at %C, " - "but got %s", s1, s2); + "but got %qs", s1, s2); } } @@ -4623,7 +4623,7 @@ check_dtio_arg_TKR_intent (gfc_symbol *fsym, bool typebound, bt type, "ASSUMED SHAPE ARRAY", &fsym->declared_at); if (fsym->attr.intent != intent) - gfc_error ("DTIO dummy argument at %L must have intent %s", + gfc_error ("DTIO dummy argument at %L must have INTENT %s", &fsym->declared_at, gfc_code2string (intents, (int)intent)); return; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 651eb79a237..6e37ca9b5fe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2017-02-25 Dominique d'Humieres + + PR fortran/79597 + * gfortran.dg/dtio_6.f90: Update test. + +2017-02-25 Dominique d'Humieres + + PR fortran/79601 + * gfortran.dg/interface_operator_2.f90: New test. + 2017-02-24 Jakub Jelinek PR c/79677 diff --git a/gcc/testsuite/gfortran.dg/dtio_6.f90 b/gcc/testsuite/gfortran.dg/dtio_6.f90 index 089db6facf0..db7e4a83ba2 100644 --- a/gcc/testsuite/gfortran.dg/dtio_6.f90 +++ b/gcc/testsuite/gfortran.dg/dtio_6.f90 @@ -59,7 +59,7 @@ CONTAINS READ (UNIT = UNIT, FMT = *) dtv%name, dtv%age END SUBROUTINE prf - SUBROUTINE pwuf (dtv,unit,iostat,iomsg) ! { dg-error "must have intent IN" } + SUBROUTINE pwuf (dtv,unit,iostat,iomsg) ! { dg-error "must have INTENT IN" } CLASS(person), INTENT(INOUT) :: dtv INTEGER, INTENT(IN) :: unit INTEGER, INTENT(OUT) :: iostat diff --git a/gcc/testsuite/gfortran.dg/interface_operator_2.f90 b/gcc/testsuite/gfortran.dg/interface_operator_2.f90 new file mode 100644 index 00000000000..a73959650e2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/interface_operator_2.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! PR fortran/66106 +! +! Original code from Gerhard Steinmetz +! +program p + interface operator ( .gt. ) + end interface operator (.lt.) ! { dg-error "END INTERFACE OPERATOR" } +end program p ! { dg-error "END INTERFACE" } +! { dg-excess-errors "Unexpected end of file" }