From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../fortran/3 module procedure/use_syntax.f90 | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 meson/test cases/fortran/3 module procedure/use_syntax.f90 (limited to 'meson/test cases/fortran/3 module procedure/use_syntax.f90') diff --git a/meson/test cases/fortran/3 module procedure/use_syntax.f90 b/meson/test cases/fortran/3 module procedure/use_syntax.f90 new file mode 100644 index 000000000..2f3a9e652 --- /dev/null +++ b/meson/test cases/fortran/3 module procedure/use_syntax.f90 @@ -0,0 +1,31 @@ +module circle +implicit none + +integer :: x +real :: radius + +interface default + module procedure timestwo +end interface + +contains + +elemental integer function timestwo(x) result(y) + integer, intent(in) :: x + y = 2*x +end function +end module circle + +program prog + +use, non_intrinsic :: circle, only: timestwo, x + +implicit none + +x = 3 + +if (timestwo(x) /= 6) error stop 'fortran module procedure problem' + +print *,'OK: Fortran module procedure' + +end program prog -- cgit 1.2.3-korg