Commit 3c2d01f1 by Jakub Jelinek Committed by Jakub Jelinek

decl.c (gfc_match_entry): Allow ENTRY without parentheses even in FUNCTIONs.

	* decl.c (gfc_match_entry): Allow ENTRY without parentheses
	even in FUNCTIONs.

	* gfortran.fortran-torture/execute/entry_9.f90: New test.

From-SVN: r101672
parent ef0087a7
2005-07-07 Jakub Jelinek <jakub@redhat.com>
* decl.c (gfc_match_entry): Allow ENTRY without parentheses
even in FUNCTIONs.
2005-07-03 Kazu Hirata <kazu@codesourcery.com> 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
* gfortran.texi, intrinsic.texi: Fix typos. * gfortran.texi, intrinsic.texi: Fix typos.
......
...@@ -2395,7 +2395,7 @@ gfc_match_entry (void) ...@@ -2395,7 +2395,7 @@ gfc_match_entry (void)
else else
{ {
/* An entry in a function. */ /* An entry in a function. */
m = gfc_match_formal_arglist (entry, 0, 0); m = gfc_match_formal_arglist (entry, 0, 1);
if (m != MATCH_YES) if (m != MATCH_YES)
return MATCH_ERROR; return MATCH_ERROR;
......
2005-07-07 Jakub Jelinek <jakub@redhat.com>
* gfortran.fortran-torture/execute/entry_9.f90: New test.
2005-07-06 Fariborz Jahanian <fjahanian@apple.com> 2005-07-06 Fariborz Jahanian <fjahanian@apple.com>
* gcc.dg/20030324-1.c: Remove -fforce-mem option. * gcc.dg/20030324-1.c: Remove -fforce-mem option.
......
! Test alternate entry points for functions when the result types
! of all entry points match
function f1 (a)
integer a, f1, e1
f1 = 15 + a
return
entry e1
e1 = 42
end function
function f2 ()
real f2, e2
entry e2
e2 = 45
end function
program entrytest
integer f1, e1
real f2, e2
if (f1 (6) .ne. 21) call abort ()
if (e1 () .ne. 42) call abort ()
if (f2 () .ne. 45) call abort ()
if (e2 () .ne. 45) call abort ()
end
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