1! { dg-do compile }
2! Test fix for F95 part of PR39800, in which the host association of the type 't1'
3! generated an error.
4!
5! Reported to clf by Alexei Matveev <Alexei Matveev@gmail.com> and reported by
6! Tobias Burnus  <burnus@gcc.gnu.org>
7!
8module m
9  implicit none
10  private
11
12  type :: t1
13    integer :: i
14  end type
15
16  type :: t2
17    type(t1) :: j
18  end type
19
20  contains
21
22    subroutine sub()
23      implicit none
24
25      type :: t3
26        type(t1) :: j
27      end type
28
29    end subroutine
30
31end module
32