OSDN Git Service

2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / private_type_1.f90
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
3 ! PR21986 - test based on original example.
4 ! A public subroutine must not have private-type, dummy arguments.
5 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
6 module modboom
7   implicit none
8   private
9   public:: dummysub
10   type:: intwrapper
11     integer n
12   end type intwrapper
13 contains
14   subroutine dummysub(size, arg_array) ! { dg-error "PRIVATE type and cannot be a dummy argument" }
15    type(intwrapper) :: size
16    real, dimension(size%n) :: arg_array
17    real :: local_array(4)
18   end subroutine dummysub
19 end module modboom
20
21 ! { dg-final { cleanup-modules "modboom" } }