aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/charlen_17.f90
blob: 6b766d8f4338705b71d8b171ecf352b605e35984 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { 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