From 7aa34e7a72a84335eb06d5afef13c9e5e5b61f8e Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Fri, 27 Jul 2007 16:33:50 +0000 Subject: [PATCH] re PR fortran/32760 (Error defining subroutine named PRINT) 2007-07-27 Jerry DeLisle PR fortran/32760 * gfortran.dg/private_type_7.f90: New test. From-SVN: r126982 --- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/gfortran.dg/private_type_7.f90 | 34 ++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/private_type_7.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 863402c49cb..cdfbcb8ddcd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-07-27 Jerry DeLisle + + PR fortran/32760 + * gfortran.dg/private_type_7.f90: New test. + 2007-07-27 Francois-Xavier Coudert PR fortran/32035 diff --git a/gcc/testsuite/gfortran.dg/private_type_7.f90 b/gcc/testsuite/gfortran.dg/private_type_7.f90 new file mode 100644 index 00000000000..c44917259c2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/private_type_7.f90 @@ -0,0 +1,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