OSDN Git Service

ChangeLogs fixed, again.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / private_type_4.f90
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
3 ! PR 25093: Check that a PUBLIC function can't be of PRIVATE type
4 ! in Fortran 95; in Fortran 2003 it is allowed (cf. PR fortran/38065)
5 !
6 module m1
7
8     type :: t1
9         integer :: i
10     end type t1
11
12     private :: t1
13     public :: f1
14
15 contains
16
17     type(t1) function f1() ! { dg-error "of PRIVATE derived type" }
18     end function
19
20 end module
21
22 ! { dg-final { cleanup-modules "m1" } }