https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84276
--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Thu, Feb 08, 2018 at 02:26:50AM +0000, sgk at troutmask dot apl.washington.edu wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84276 > > --- Comment #1 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- > Reduced testcase. > > subroutine stepns(hh,h,s,w) > real, intent(inout) :: h,hh,s > real, intent(out) :: w > real :: qofs > qofs(s)=s > w=qofs(hh+h) > end subroutine stepns > > Problem occurs with interface.c:3219. > So, the problem appears to boil down to gfortran acquiring not only the type and type parameters from the declaration statements, but also the attributes. Statement functions should not inherit the attributes.