summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/src
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2011-05-06 01:30:03 +0300
committerPearu Peterson <pearu.peterson@gmail.com>2011-05-06 01:30:19 +0300
commitf393b6041c0d124b0372c494bab7de8dbe0cd422 (patch)
tree20adefd93eeb224f10ecdcb4b7b73487938bc312 /numpy/f2py/tests/src
parent516d50cf42833c34ca617c2f09e0e779c6b93665 (diff)
downloadnumpy-f393b6041c0d124b0372c494bab7de8dbe0cd422.tar.gz
BUG: Fix assumed shape support for module routines.
Diffstat (limited to 'numpy/f2py/tests/src')
-rw-r--r--numpy/f2py/tests/src/assumed_shape/foo_mod.f9041
1 files changed, 41 insertions, 0 deletions
diff --git a/numpy/f2py/tests/src/assumed_shape/foo_mod.f90 b/numpy/f2py/tests/src/assumed_shape/foo_mod.f90
new file mode 100644
index 000000000..cbe6317ed
--- /dev/null
+++ b/numpy/f2py/tests/src/assumed_shape/foo_mod.f90
@@ -0,0 +1,41 @@
+
+module mod
+
+contains
+
+subroutine sum(x, res)
+ implicit none
+ real, intent(in) :: x(:)
+ real, intent(out) :: res
+
+ integer :: i
+
+ !print *, "sum: size(x) = ", size(x)
+
+ res = 0.0
+
+ do i = 1, size(x)
+ res = res + x(i)
+ enddo
+
+end subroutine sum
+
+function fsum(x) result (res)
+ implicit none
+ real, intent(in) :: x(:)
+ real :: res
+
+ integer :: i
+
+ !print *, "fsum: size(x) = ", size(x)
+
+ res = 0.0
+
+ do i = 1, size(x)
+ res = res + x(i)
+ enddo
+
+end function fsum
+
+
+end module mod