gcc/testsuite/gfortran.dg/statement_function_3.f
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/35299 |
| 3 | subroutine phtod(e,n,i,h) |
| 4 | dimension e(n) |
| 5 | hstar(e,b)=b**.4*((1.25*fun(-e/40)+.18)) ! { dg-error "must be scalar" } |
| 6 | a = 1. |
| 7 | h = hstar(e(i-1), a) |
| 8 | end |
| 9 | |
| 10 | function fun(a) |
| 11 | real a(*) |
| 12 | fun = 42 |
| 13 | end |
| 14 | ! { dg-prune-output " Obsolescent feature" } |
| 15 |