aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f9024
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90
new file mode 100644
index 000000000..c68d75af7
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90
@@ -0,0 +1,24 @@
+module entry_8_m
+type t
+ integer i
+ real x (5)
+end type t
+end module entry_8_m
+
+function f (i)
+ use entry_8_m
+ type (t) :: f,g
+ f % i = i
+ return
+ entry g (x)
+ g%x = x
+end function f
+
+use entry_8_m
+type (t) :: f, g, res
+
+res = f (42)
+if (res%i /= 42) call abort ()
+res = g (1.)
+if (any (res%x /= 1.)) call abort ()
+end