libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / use_23.f90
blobda05e1a8e207f6e519352b7b3a07e6f659ab94f1
1 ! { dg-do compile }
3 ! PR fortran/42769
4 ! This test used to ICE in resolve_typebound_procedure because T1's GET
5 ! procedure was wrongly associated to MOD2's MY_GET (instead of the original
6 ! MOD1's MY_GET) in MOD3's SUB.
8 ! Original testcase by Salvator Filippone <sfilippone@uniroma2.it>
9 ! Reduced by Janus Weil <janus@gcc.gnu.org>
11 module mod1
12 type :: t1
13 contains
14 procedure, nopass :: get => my_get
15 end type
16 contains
17 logical function my_get()
18 end function
19 end module
21 module mod2
22 contains
23 logical function my_get()
24 end function
25 end module
27 module mod3
28 contains
29 subroutine sub(a)
30 use mod2, only: my_get
31 use mod1, only: t1
32 type(t1) :: a
33 end subroutine
34 end module
37 use mod2, only: my_get
38 use mod3, only: sub
39 end