PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / unresolved_fixup_1.f90
blob07fbce3d5957fb34484b4049892baf2d18d11d0e
1 ! { dg-do compile }
3 ! PR fortran/58007
4 ! Unresolved fixup while loading a module.
6 ! This tests that the specification expression A%MAX_DEGREE in module BSR is
7 ! correctly loaded and resolved in program MAIN.
9 ! Original testcase from Daniel Shapiro <shapero@uw.edu>
10 ! Reduced by Tobias Burnus <burnus@net-b.de> and Janus Weil <janus@gcc.gnu.org>
12 module matrix
13 type :: sparse_matrix
14 integer :: max_degree
15 end type
16 contains
17 subroutine init_interface (A)
18 class(sparse_matrix), intent(in) :: A
19 end subroutine
20 real function get_value_interface()
21 end function
22 end module
24 module ellpack
25 use matrix
26 end module
28 module bsr
29 use matrix
30 type, extends(sparse_matrix) :: bsr_matrix
31 contains
32 procedure :: get_neighbors
33 end type
34 contains
35 function get_neighbors (A)
36 class(bsr_matrix), intent(in) :: A
37 integer :: get_neighbors(A%max_degree)
38 end function
39 end module
41 program main
42 use ellpack
43 use bsr
44 end