Debian Codegraph @

gcc/testsuite/gfortran.dg/unresolved_fixup_1.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/58007
4 ! Unresolved fixup 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 <[email protected]>
10 ! Reduced by Tobias Burnus <[email protected]> and Janus Weil <[email protected]>
11
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
23
24 module ellpack
25 use matrix
26 end module
27
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
40
41 program main
42 use ellpack
43 use bsr
44 end