blob: 9ff39b267cdd17f77627b5176e151e3c947ec3a8 [file] [log] [blame]
! { dg-do compile }
! PR 25093: Check that a PUBLIC function can't be of PRIVATE type
module m1
type :: t1
integer :: i
end type t1
private :: t1
public :: f1
contains
type(t1) function f1() ! { dg-error "cannot be of PRIVATE type" }
end function
end module
! { dg-final { cleanup-modules "m1" } }