OSDN Git Service

PR c++/41920
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / result_in_spec_3.f90
1 ! { dg-do compile }
2 ! { dg-options "-std=gnu -Wreturn-type" }
3 ! PR fortran/34248
4 !
5 ! There was an ICE for assumed-length functions
6 ! if RESULT(...) was used and no value assigned
7 ! to the result variable.
8 !
9 character(*) FUNCTION test() RESULT(ctab)
10   ctab = "Hello"
11 END function test
12
13 FUNCTION test2() RESULT(res)      ! { dg-warning "not set" }
14   character(*) :: res
15 END function test2