------- Comment #8 from sgk at troutmask dot apl dot washington dot edu 2008-02-29 23:52 ------- Subject: Re: scope of variables in statement function do not acquire rank from host
> > Don't worry, I share your confusion (when I read the standard). :) > > I think the passage you quote applies to the following code: > > program z > real :: y = 2. > real :: x(5) = 1. > f(x(2:4)) = 2 * sum(x) ! dummy arg is an array. > g(y) = y * x ! function g is an array because of x. > end program z > Well, Richard Maine shot these down from other considerations. The x(2:4) isn't a dummy-arg-name, so that one's out. In 'g(y) = y * x', the RHS is not a scal-expr, so that one's out. BTW, I don't use statement function, and I've come to dislike them even more after thinking about this issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35299