re PR libfortran/47439 (Fun with scratch files on Windows MKTEMP only allows for...
[official-gcc.git] / gcc / testsuite / gfortran.dg / private_type_7.f90
blobb9ad8fab7ed4f5ee01fa86aa39382728144277aa
1 ! { dg-do compile }
2 ! PR32760 Error defining subroutine named PRINT
3 ! Test case derived from original PR.
5 module gfcbug68
6 implicit none
7 private :: write
9 contains
11 function foo (i)
12 integer, intent(in) :: i
13 integer foo
15 write (*,*) i
16 call write(i)
17 foo = i
18 end function foo
20 subroutine write (m)
21 integer, intent(in) :: m
22 print *, m*m*m
23 end subroutine write
25 end module gfcbug68
27 program testit
28 use gfcbug68
29 integer :: i = 27
30 integer :: k
32 k = foo(i)
33 print *, "in the main:", k
34 end program testit
35 ! { dg-final { cleanup-modules "gfcbug68" } }