OSDN Git Service

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