diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-06 22:12:25 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-06 22:12:25 +0000 |
commit | 69643e1d2bc0b3fd70975233ddc3270610962988 (patch) | |
tree | 40fc84d8cf152cacee76d78d723bafad3157f094 /gcc | |
parent | 07da521484d5a3159493068fd444b2e9878e8994 (diff) | |
download | gcc-69643e1d2bc0b3fd70975233ddc3270610962988.tar.gz |
* decl.c (gfc_match_entry): Allow ENTRY without parentheses
even in FUNCTIONs.
* gfortran.fortran-torture/execute/entry_9.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/entry_9.f90 | 24 |
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ea4bf4bfede..129b763f7a0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +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> * gfortran.texi, intrinsic.texi: Fix typos. diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index c4cadc72948..9852cb0c42b 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2395,7 +2395,7 @@ gfc_match_entry (void) else { /* 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) return MATCH_ERROR; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 445ac810b40..817f2733527 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +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> * gcc.dg/20030324-1.c: Remove -fforce-mem option. diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/entry_9.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/entry_9.f90 new file mode 100644 index 00000000000..d29f4b8344c --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/entry_9.f90 @@ -0,0 +1,24 @@ +! 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 |