gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90
raw| 1 | module entry_8_m |
| 2 | type t |
| 3 | integer i |
| 4 | real x (5) |
| 5 | end type t |
| 6 | end module entry_8_m |
| 7 | |
| 8 | function f (i) |
| 9 | use entry_8_m |
| 10 | type (t) :: f,g |
| 11 | f % i = i |
| 12 | return |
| 13 | entry g (x) |
| 14 | g%x = x |
| 15 | end function f |
| 16 | |
| 17 | use entry_8_m |
| 18 | type (t) :: f, g, res |
| 19 | |
| 20 | res = f (42) |
| 21 | if (res%i /= 42) STOP 1 |
| 22 | res = g (1.) |
| 23 | if (any (res%x /= 1.)) STOP 2 |
| 24 | end |