From c235e3884fbbf1a657fb2b2bfe1defa0b9fd8dd9 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 5 Feb 2006 19:52:35 +0000 Subject: [PATCH] re PR fortran/26041 ([4.1]: FORTRAN compiler won't compile the valid code) 2006-02-05 H.J. Lu PR fortran/26041 PR fortran/26064 * gfortran.dg/sibling_dummy_procedure_1.f90: New file. * gfortran.dg/sibling_dummy_procedure_2.f90: Likewise. * gfortran.dg/sibling_dummy_procedure_3.f90: Likewise. From-SVN: r110618 --- gcc/testsuite/ChangeLog | 8 +++++ .../gfortran.dg/sibling_dummy_procedure_1.f90 | 32 +++++++++++++++++++ .../gfortran.dg/sibling_dummy_procedure_2.f90 | 32 +++++++++++++++++++ .../gfortran.dg/sibling_dummy_procedure_3.f90 | 18 +++++++++++ 4 files changed, 90 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fc1aa79f96b..a654677d188 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2006-02-05 H.J. Lu + + PR fortran/26041 + PR fortran/26064 + * gfortran.dg/sibling_dummy_procedure_1.f90: New file. + * gfortran.dg/sibling_dummy_procedure_2.f90: Likewise. + * gfortran.dg/sibling_dummy_procedure_3.f90: Likewise. + 2006-02-05 Jakub Jelinek * gcc.dg/gomp/pr25990.c: Use __SIZE_TYPE__ instead of unsigned int diff --git a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90 b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90 new file mode 100644 index 00000000000..f18f291c405 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90 @@ -0,0 +1,32 @@ +! { dg-do compile } +! This checks the fix for PR 26041. +! +! Contributed by H.J. Lu +module foo + public bar_ + interface bar_ + module procedure bar + end interface + public xxx_ + interface xxx_ + module procedure xxx + end interface +contains + subroutine bar(self, z) + interface + function self(z) result(res) + real z + real(kind=kind(1.0d0)) :: res + end function + end interface + end subroutine + subroutine xxx(self,z) + interface + function self(z) result(res) + real z + real(kind=kind(1.0d0)) :: res + end function + end interface + call bar(self, z) + end subroutine +end diff --git a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90 b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90 new file mode 100644 index 00000000000..031a537d293 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90 @@ -0,0 +1,32 @@ +! { dg-do compile } +! This checks the fix for PR 26041. +! +! Contributed by H.J. Lu +module foo + public bar_ + interface bar_ + module procedure bar + end interface + public xxx_ + interface xxx_ + module procedure xxx + end interface +contains + subroutine bar(self, z) + interface + function self(z) result(res) + real z + real(kind=kind(1.0d0)) :: res + end function + end interface + end subroutine + subroutine xxx(self,z) + interface + function self(z) result(res) + real z + real(kind=kind(1.0d0)) :: res + end function + end interface + call bar_(self, z) + end subroutine +end diff --git a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90 b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90 new file mode 100644 index 00000000000..5f1391edb60 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90 @@ -0,0 +1,18 @@ +! { dg-do compile } +! This checks the fix for PR 26064 +! +! Contributed by Sven Buijssen +module ice + implicit none + contains + + subroutine foo() + contains + + subroutine bar(baz) + integer, optional :: baz + if (present(baz)) then + endif + end subroutine bar + end subroutine foo +end module -- 2.30.2