OSDN Git Service

PR fortran/30964
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / private_type_5.f90
1 ! { dg-do compile }
2 ! Tests the fix for PR26779, where an error would occur because
3 ! init was detected to be public with a private type dummy argument.
4 !
5 ! Contributed by Paul Thomas  <pault@gcc.gnu.org>
6 !
7 module test
8   public sub
9   type, private :: t
10     integer :: i
11   end type t
12 contains
13   subroutine sub (arg)
14     integer arg
15     type(t) :: root
16     call init(root, arg)
17   contains
18     subroutine init(ir, i)
19       integer i
20       type(t) :: ir
21       ir%i = i
22     end subroutine init
23   end subroutine sub
24 end module test
25 ! { dg-final { cleanup-modules "test" } }