view gcc/testsuite/gfortran.dg/function_charlen_1.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! Tests the fix for PR34429 in which function charlens that were
! USE associated would cause an error.
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
!
module m
  integer, parameter :: strlen = 5
end module m

character(strlen) function test()
  use m
  test = 'A'
end function test

  interface
    character(strlen) function test()
      use m
    end function test
  end interface
  print *, test()
end