Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gfortran.dg / private_type_4.f90
blob9ff39b267cdd17f77627b5176e151e3c947ec3a8
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
12 contains
14 type(t1) function f1() ! { dg-error "cannot be of PRIVATE type" }
15 end function
17 end module
19 ! { dg-final { cleanup-modules "m1" } }