diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-02 23:03:26 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-02 23:03:26 +0000 |
commit | 53ba0f7f4ab76e26eed5e7ae6d46c0c2393e8a92 (patch) | |
tree | 66afbf9f5ee054453c17e995d558773b4a7bdea4 /gcc/testsuite/gfortran.dg | |
parent | 6ce12f877daaed78856711617dde198f21b56034 (diff) | |
download | gcc-53ba0f7f4ab76e26eed5e7ae6d46c0c2393e8a92.tar.gz |
2007-03-02 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/30873
* decl.c (gfc_match_entry): Remove erroneous entry result check.
2007-03-02 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/30873
* gfortran.dg/entry_9.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122495 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/entry_9.f90 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/entry_9.f90 b/gcc/testsuite/gfortran.dg/entry_9.f90 new file mode 100644 index 00000000000..1daf49ce621 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/entry_9.f90 @@ -0,0 +1,31 @@ +! { dg-do "run" } +! Check whether RESULT of ENTRY defaults to entry-name. +! PR fortran/30873 +! +! Contributed by Joost VandeVondele <jv244@cam.ac.uk> +! +MODULE M1 + CONTAINS + FUNCTION F2(K) + INTEGER :: F2,K + F2=E1(K) + END FUNCTION F2 + + RECURSIVE FUNCTION F1(I) + INTEGER :: F1,I,E1 + F1=F2(I) + RETURN + ENTRY E1(I) + E1=-I + RETURN + END FUNCTION F1 +END MODULE M1 + +program main + use m1 + if (E1(5) /= -5) call abort() + if (F2(4) /= -4) call abort() + if (F1(1) /= -1) call abort() +end program main + +! { dg-final { cleanup-modules "m1" } } |