re PR fortran/79597 (Incomplete error message "Expecting %<END INTERFACE OPERATOR")

2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>

	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  <dominiq@lps.ens.fr>

	PR fortran/79597
	* gfortran.dg/dtio_6.f90: Update test.

2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/79601
	* interface.c (check_dtio_arg_TKR_intent): Change 'intent'
	to 'INTENT'.

2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/79601
	* gfortran.dg/interface_operator_2.f90: New test.

From-SVN: r245729
This commit is contained in:
Dominique d'Humieres 2017-02-25 00:40:42 +01:00 committed by Dominique d'Humieres
parent b982244362
commit 77be94177a
5 changed files with 36 additions and 4 deletions

View File

@ -1,3 +1,15 @@
2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/79601
* interface.c (check_dtio_arg_TKR_intent): Change 'intent'
to 'INTENT'.
2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
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 <pault@gcc.gnu.org>
PR fortran/79599

View File

@ -398,10 +398,10 @@ gfc_match_end_interface (void)
m = MATCH_ERROR;
if (strcmp(s2, "none") == 0)
gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> "
"at %C, ", s1);
"at %C", s1);
else
gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> 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;
}

View File

@ -1,3 +1,13 @@
2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/79597
* gfortran.dg/dtio_6.f90: Update test.
2017-02-25 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/79601
* gfortran.dg/interface_operator_2.f90: New test.
2017-02-24 Jakub Jelinek <jakub@redhat.com>
PR c/79677

View File

@ -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

View File

@ -0,0 +1,10 @@
! { dg-do compile }
! PR fortran/66106
!
! Original code from Gerhard Steinmetz
! <gerhard dot steinmetz dot fortran at t-online dot de>
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" }