Commit 77be9417 by Dominique d'Humieres Committed by Dominique d'Humieres

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
parent b9822443
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> 2017-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/79599 PR fortran/79599
......
...@@ -398,10 +398,10 @@ gfc_match_end_interface (void) ...@@ -398,10 +398,10 @@ gfc_match_end_interface (void)
m = MATCH_ERROR; m = MATCH_ERROR;
if (strcmp(s2, "none") == 0) if (strcmp(s2, "none") == 0)
gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> " gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> "
"at %C, ", s1); "at %C", s1);
else else
gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> at %C, " 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, ...@@ -4623,7 +4623,7 @@ check_dtio_arg_TKR_intent (gfc_symbol *fsym, bool typebound, bt type,
"ASSUMED SHAPE ARRAY", &fsym->declared_at); "ASSUMED SHAPE ARRAY", &fsym->declared_at);
if (fsym->attr.intent != intent) 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)); &fsym->declared_at, gfc_code2string (intents, (int)intent));
return; return;
} }
......
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> 2017-02-24 Jakub Jelinek <jakub@redhat.com>
PR c/79677 PR c/79677
......
...@@ -59,7 +59,7 @@ CONTAINS ...@@ -59,7 +59,7 @@ CONTAINS
READ (UNIT = UNIT, FMT = *) dtv%name, dtv%age READ (UNIT = UNIT, FMT = *) dtv%name, dtv%age
END SUBROUTINE prf 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 CLASS(person), INTENT(INOUT) :: dtv
INTEGER, INTENT(IN) :: unit INTEGER, INTENT(IN) :: unit
INTEGER, INTENT(OUT) :: iostat INTEGER, INTENT(OUT) :: iostat
......
! { 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" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment