1! { dg-do compile }
2!
3! PR fortran/58007
4! Unresolved fiixup while loading a module.
5!
6! This tests that the specification expression A%MAX_DEGREE in module BSR is
7! correctly loaded and resolved in program MAIN.
8!
9! Original testcase from Daniel Shapiro <shapero@uw.edu>
10
11module matrix
12  type :: sparse_matrix
13    integer :: max_degree
14  end type
15end module
16
17module bsr
18  use matrix
19
20  type, extends(sparse_matrix) :: bsr_matrix
21  end type
22
23  integer :: i1
24  integer :: i2
25  integer :: i3
26contains
27  function get_neighbors (A)
28    type(bsr_matrix), intent(in) :: A
29    integer :: get_neighbors(A%max_degree)
30  end function
31end module
32
33program main
34  use matrix
35  use bsr
36end
37