aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/result_in_spec_3.f90
blob: 1cfb8647d95e0673b3162ac472f31a19c5d7efc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
!
! PR fortran/34248
!
! There was an ICE for assumed-length functions
! if RESULT(...) was used and no value assigned
! to the result variable.
!
character(*) FUNCTION test() RESULT(ctab)
  ctab = "Hello"
END function test

FUNCTION test2() RESULT(res)
  character(*) :: res
END function test2