1! { dg-do compile }
2module mymod
3  type :: mytyp
4    integer :: i
5  end type mytyp
6contains
7  subroutine mysub
8    implicit none
9    type(mytyp) :: a
10    integer :: privatei,privatej
11    privatei = a%i
12    privatej = a%j       ! { dg-error "is not a member" }
13  end subroutine mysub
14end module mymod
15