Merge from mainline
[official-gcc.git] / gcc / testsuite / gfortran.dg / private_type_4.f90
bloba5b5578c45ae5d5a7bccbeb84abbea8d848da54f
1 ! { dg-do compile }
2 ! PR 25093: Check that a PUBLIC function can't be of PRIVATE type
3 module m1
5 type :: t1
6 integer :: i
7 end type t1
9 private :: t1
10 public :: f1 ! { dg-error "cannot be of PRIVATE type" }
12 contains
14 type(t1) function f1()
15 end function
17 end module