2 ! { dg-options "-ff2c" }
3 ! Verifies that array results work with -ff2c
4 ! try all permutations of result clause in function yes/no
5 ! and result clause in interface yes/no
6 ! this is not possible in Fortran 77, but this exercises a previously
8 function c() result (r)
18 subroutine test_without_result
31 if (any(z /= 0.)) call abort ()
33 if (any(z /= 1.)) call abort ()
34 end subroutine test_without_result
36 subroutine test_with_result
38 function c () result(r)
43 function d () result(r)
49 if (any(z /= 0.)) call abort ()
51 if (any(z /= 1.)) call abort ()
52 end subroutine test_with_result
54 call test_without_result