view gcc/testsuite/gfortran.dg/charlen_17.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

! { dg-do compile }
! PR 87673 - used to cause errors about non-pure functions.

module x
  implicit none
contains
  pure function foo() result(res)
    character(len=:), allocatable :: res
    allocate (character(bar()) :: res)
  end function foo
  pure integer function bar()
    bar = 1
  end function bar
end module x