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