Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_source_20.f03
blob67b50ec0d85efdee880753ea94cc6d240755e0da
1 ! { dg-do run }
3 ! Check that PR72698 is fixed.
4 ! Contributed by Gerhard Steinmetz
6 module m
7 contains
8    integer function f()
9       f = 4
10    end
11 end
12 program p
13    use m
14    character(3), parameter :: c = 'abc'
15    character(:), allocatable :: z
16    allocate (z, source=repeat(c(2:1), f()))
17    if (len(z) /= 0) call abort()
18    if (z /= "") call abort()
19 end