Debian Codegraph @

gcc/testsuite/gfortran.dg/generic_22.f03

raw
1 ! { dg-do compile }
2 ! Test the fix for PR43492, in which the generic call caused and ICE.
3 !
4 ! Contributed by Salvatore Filippone <[email protected]>
5 !
6 module base_mod
7
8 type :: base_mat
9 integer, private :: m, n
10 contains
11 procedure, pass(a) :: transp1 => base_transp1
12 generic, public :: transp => transp1
13 procedure, pass(a) :: transc1 => base_transc1
14 generic, public :: transc => transc1
15 end type base_mat
16
17 contains
18
19 subroutine base_transp1(a)
20 implicit none
21
22 class(base_mat), intent(inout) :: a
23 integer :: itmp
24 itmp = a%m
25 a%m = a%n
26 a%n = itmp
27 end subroutine base_transp1
28 subroutine base_transc1(a)
29 implicit none
30 class(base_mat), intent(inout) :: a
31
32 call a%transp()
33 !!$ call a%transp1()
34 end subroutine base_transc1
35
36
37 end module base_mod