summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/overload_2.f90
blob: feefb4607228cf4e424c6bb239bcb7341eab64bb (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
! { dg-do compile }
! Test the fix for PR32157, in which overloading 'LEN', as
! in 'test' below would cause a compile error.
!
! Contributed by Michael Richmond <michael.a.richmond@nasa.gov>
!
subroutine len(c)
  implicit none
  character :: c
  c = "X"
end subroutine len

subroutine test()
  implicit none
  character :: str
  external len
  call len(str)
  if(str /= "X") call abort()
end subroutine test

PROGRAM VAL
 implicit none
 external test
 intrinsic len
 call test()
 if(len(" ") /= 1) call abort()
END