aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/private_type_7.f90
blob: c44917259c208f44769610ab6f3fb2073107400c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
! { dg-do compile }
! PR32760 Error defining subroutine named PRINT
! Test case derived from original PR.

module gfcbug68
  implicit none
  private :: write

contains

  function foo (i)
    integer, intent(in)  :: i
    integer foo

    write (*,*) i
    call write(i)
    foo = i
  end function foo

  subroutine write (m)
    integer, intent(in) :: m
    print *, m*m*m
  end subroutine write

end module gfcbug68

program testit
  use gfcbug68
  integer :: i = 27
  integer :: k
  
  k = foo(i)
  print *, "in the main:", k
end program testit