aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/private_type_1.f90
blob: 0f0f8d25c443c8eb82c19bebf8a4ef0c118c05dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! { dg-options "-std=f95" }
! PR21986 - test based on original example.
! A public subroutine must not have private-type, dummy arguments.
! Contributed by Paul Thomas <pault@gcc.gnu.org>
module modboom
  implicit none
  private
  public:: dummysub
  type:: intwrapper
    integer n
  end type intwrapper
contains
  subroutine dummysub(size, arg_array) ! { dg-error "PRIVATE type and cannot be a dummy argument" }
   type(intwrapper) :: size
   real, dimension(size%n) :: arg_array
   real :: local_array(4)
  end subroutine dummysub
end module modboom