diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-11-03 01:54:02 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-11-03 01:54:02 +0100 |
commit | 36f4d1449ca5c83321e28cdffaf0182373b1e8d7 (patch) | |
tree | a3c2776c7588923bfc84eb7166497f543c81070a /gcc/testsuite/gfortran.dg | |
parent | fc706639e88a5b87ad5c3f40e286a55612a04237 (diff) | |
download | gcc-36f4d1449ca5c83321e28cdffaf0182373b1e8d7.zip gcc-36f4d1449ca5c83321e28cdffaf0182373b1e8d7.tar.gz gcc-36f4d1449ca5c83321e28cdffaf0182373b1e8d7.tar.bz2 |
re PR fortran/17535 (gfortran with module procedures)
fortran/
PR fortran/17535
PR fortran/17583
PR fortran/17713
* module.c (write_symbol1): Set module_name for dummy arguments.
testsuite/
PR fortran/17535
PR fortran/17583
PR fortran/17713
* gfortran.dg/generic_[123].f90: New testcases.
From-SVN: r90011
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/generic_1.f90 | 19 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/generic_2.f90 | 20 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/generic_3.f90 | 30 |
3 files changed, 69 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/generic_1.f90 b/gcc/testsuite/gfortran.dg/generic_1.f90 new file mode 100644 index 0000000..1cbf4bb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/generic_1.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! reduced testcase from PR 17535 +module FOO + interface BAR + + subroutine BAR1(X) + integer :: X + end subroutine + + subroutine BAR2(X) + real :: X + end subroutine + + end interface +end module + +subroutine BAZ(X) + use FOO +end subroutine diff --git a/gcc/testsuite/gfortran.dg/generic_2.f90 b/gcc/testsuite/gfortran.dg/generic_2.f90 new file mode 100644 index 0000000..802e966 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/generic_2.f90 @@ -0,0 +1,20 @@ +! { dg-do compile } +! testcase from PR 17583 +module bidon + + interface + subroutine drivexc(nspden,rho_updn) + integer, intent(in) :: nspden + integer, intent(in) :: rho_updn(nspden) + end subroutine drivexc + end interface + +end module bidon + + subroutine nonlinear(nspden) + + use bidon + + integer,intent(in) :: nspden + + end subroutine nonlinear diff --git a/gcc/testsuite/gfortran.dg/generic_3.f90 b/gcc/testsuite/gfortran.dg/generic_3.f90 new file mode 100644 index 0000000..3cd2e9d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/generic_3.f90 @@ -0,0 +1,30 @@ +! { dg-do compile } +! Testcase from PR 17713 +module fit_functions + implicit none +contains + subroutine gauss( x, a, y, dy, ma ) + double precision, intent(in) :: x + double precision, intent(in) :: a(:) + double precision, intent(out) :: y + double precision, intent(out) :: dy(:) + integer, intent(in) :: ma + end subroutine gauss +end module fit_functions + +subroutine mrqcof( x, y, sig, ndata, a, ia, ma ) + use fit_functions + + implicit none + double precision, intent(in) :: x(:), y(:), sig(:) + integer, intent(in) :: ndata + double precision, intent(in) :: a(:) + integer, intent(in) :: ia(:), ma + + integer i + double precision yan, dyda(ma) + + do i = 1, ndata + call gauss( x(i), a, yan, dyda, ma ) + end do +end subroutine mrqcof |