re PR fortran/42651 (Functions with result: Wrongly accepts attributes to function...
[gcc.git] / gcc / testsuite / gfortran.dg / func_result_7.f90
1 ! { dg-do compile }
2 !
3 ! PR 50073: gfortran must not accept function name when result name is present
4 !
5 ! Contributed by Vittorio Zecca <zeccav@gmail.com>
6
7 function fun() result(f) ! { dg-error "RESULT variable" }
8 pointer fun ! { dg-error "RESULT variable" }
9 dimension fun(1) ! { dg-error "RESULT variable" }
10 f=0
11 end