OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [overload_2.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! Test the fix for PR32157, in which overloading 'LEN', as
! Test the fix for PR32157, in which overloading 'LEN', as
! in 'test' below would cause a compile error.
! in 'test' below would cause a compile error.
!
!
! Contributed by Michael Richmond 
! Contributed by Michael Richmond 
!
!
subroutine len(c)
subroutine len(c)
  implicit none
  implicit none
  character :: c
  character :: c
  c = "X"
  c = "X"
end subroutine len
end subroutine len
subroutine test()
subroutine test()
  implicit none
  implicit none
  character :: str
  character :: str
  external len
  external len
  call len(str)
  call len(str)
  if(str /= "X") call abort()
  if(str /= "X") call abort()
end subroutine test
end subroutine test
PROGRAM VAL
PROGRAM VAL
 implicit none
 implicit none
 external test
 external test
 intrinsic len
 intrinsic len
 call test()
 call test()
 if(len(" ") /= 1) call abort()
 if(len(" ") /= 1) call abort()
END
END
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.