gcc/testsuite/gfortran.dg/constructor_5.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR fortran/39427 |
| 4 | ! |
| 5 | ! Check constructor functionality. |
| 6 | ! |
| 7 | ! |
| 8 | module m |
| 9 | type t |
| 10 | integer :: x |
| 11 | end type t |
| 12 | interface t |
| 13 | module procedure f |
| 14 | end interface t |
| 15 | contains |
| 16 | function f() |
| 17 | type(t) :: f |
| 18 | end function |
| 19 | end module |
| 20 | |
| 21 | module m2 |
| 22 | interface t2 |
| 23 | module procedure f2 |
| 24 | end interface t2 |
| 25 | type t2 |
| 26 | integer :: x2 |
| 27 | end type t2 |
| 28 | contains |
| 29 | function f2() |
| 30 | type(t2) :: f2 |
| 31 | end function |
| 32 | end module |