https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84276
Bug ID: 84276 Summary: Invalid error for valid statement function Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kargl at gcc dot gnu.org Target Milestone: --- Found in c.l.f, but significantly reduced by me https://groups.google.com/forum/#!topic/comp.lang.fortran/MtbUxdhz_6k subroutine stepns(hh,h,s,y,yp,y1,y2,w) real, intent(inout):: h,hh,s,y,y1,yp,y2 real, intent(out) :: w real :: z2,z4,z1,z3,d,a,b,c,e,qofs z1(a,b,d)=(b-a)/d z2(a,c,b,d)=(z1(a,b,d)-c)/d z3(a,b,e,d)=(e-z1(a,b,d))/d z4(a,c,b,e,d)=(z3(a,b,e,d)-z2(a,c,b,d))/d qofs(a,c,b,e,d,s)=((z4(a,c,b,e,d)*(s-d)+z2(a,c,b,d))*s+c)*s+a w=qofs(y1,y2,y,yp,hh,hh+h) end subroutine stepns % gfcx -c HOMPACK90.f HOMPACK90.f:14:27: w=qofs(y1,y2,y,yp,hh,hh+h) 1 Error: Non-variable expression in variable definition context (actual argument to INTENT = OUT/INOUT) at (1) Code compiles if the INTENT is removed.