| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/51913 |
| 4 |
! |
| 5 |
! Contributed by Alexander Tismer |
| 6 |
! |
| 7 |
MODULE m_sparseMatrix |
| 8 |
|
| 9 |
implicit none |
| 10 |
|
| 11 |
type :: sparseMatrix_t |
| 12 |
|
| 13 |
end type sparseMatrix_t |
| 14 |
END MODULE m_sparseMatrix |
| 15 |
|
| 16 |
!=============================================================================== |
| 17 |
module m_subroutine |
| 18 |
! USE m_sparseMatrix !< when uncommenting this line program works fine |
| 19 |
|
| 20 |
implicit none |
| 21 |
|
| 22 |
contains |
| 23 |
subroutine test(matrix) |
| 24 |
use m_sparseMatrix |
| 25 |
class(sparseMatrix_t), pointer :: matrix |
| 26 |
end subroutine |
| 27 |
end module |
| 28 |
|
| 29 |
!=============================================================================== |
| 30 |
PROGRAM main |
| 31 |
use m_subroutine |
| 32 |
USE m_sparseMatrix |
| 33 |
implicit none |
| 34 |
|
| 35 |
CLASS(sparseMatrix_t), pointer :: sparseMatrix |
| 36 |
|
| 37 |
call test(sparseMatrix) |
| 38 |
END PROGRAM |