2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / statement_function_3.f
blobdcfb3e2b9dc1551a6a4256da3024f02aeb5e2057
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
10 function fun(a)
11 real a(*)
12 fun = 42
13 end
14 ! { dg-prune-output " Obsolescent feature" }