Commit 0be8cb80 by Tobias Schlüter Committed by Tobias Schlüter

re PR fortran/24008 (gfortran too permissive about ENTRY syntax)

fortran/
	PR fortran/24008
	* decl.c (gfc_match_entry): Function entries need an argument list.
testsuite/
	PR fortran/24008
	* gfortran.dg/entry_5.f90: New.
	* gfortran.fortran-torture/execute/entry_9.f90: Fix syntax error.

From-SVN: r106358
parent 6a869706
2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/24008
* decl.c (gfc_match_entry): Function entries need an argument list.
2005-11-01 Erik Edelmann <eedelman@gcc.gnu.org>
PR 24245
......
......@@ -2691,7 +2691,7 @@ gfc_match_entry (void)
else
{
/* An entry in a function. */
m = gfc_match_formal_arglist (entry, 0, 1);
m = gfc_match_formal_arglist (entry, 0, 0);
if (m != MATCH_YES)
return MATCH_ERROR;
......
2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/24008
* gfortran.dg/entry_5.f90: New.
* gfortran.fortran-torture/execute/entry_9.f90: Fix syntax error.
2005-11-01 Bob Wilson <bob.wilson@acm.org>
* gcc.dg/intmax_t-1.c: Disable for xtensa-*-elf*.
! { dg-do compile }
! PR 24008
! an argument list to the entry is required
REAL FUNCTION funct()
funct = 0.0
RETURN
!
ENTRY enter RESULT (answer) ! { dg-error "Unclassifiable statement" }
answer = 1.0
RETURN
END FUNCTION funct
......@@ -5,12 +5,12 @@
integer a, f1, e1
f1 = 15 + a
return
entry e1
entry e1()
e1 = 42
end function
function f2 ()
real f2, e2
entry e2
entry e2()
e2 = 45
end function
......
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