This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35299] scope of variables in statement function do not acquire rank from host
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Feb 2008 23:52:42 -0000
- Subject: [Bug fortran/35299] scope of variables in statement function do not acquire rank from host
- References: <bug-35299-10110@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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