libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_47.f90
blob56f342e07645ddf090d3b806a0224fa250584489
1 ! { dg-do compile }
3 ! PR fortran/51913
5 ! Contributed by Alexander Tismer
7 MODULE m_sparseMatrix
9 implicit none
11 type :: sparseMatrix_t
13 end type sparseMatrix_t
14 END MODULE m_sparseMatrix
16 !===============================================================================
17 module m_subroutine
18 ! USE m_sparseMatrix !< when uncommenting this line program works fine
20 implicit none
22 contains
23 subroutine test(matrix)
24 use m_sparseMatrix
25 class(sparseMatrix_t), pointer :: matrix
26 end subroutine
27 end module
29 !===============================================================================
30 PROGRAM main
31 use m_subroutine
32 USE m_sparseMatrix
33 implicit none
35 CLASS(sparseMatrix_t), pointer :: sparseMatrix
37 call test(sparseMatrix)
38 END PROGRAM