[Bug fortran/59398] Wrong bounds for allocatable result and for
anlauf at gmx dot de
gcc-bugzilla@gcc.gnu.org
Mon Jan 6 19:50:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59398
--- Comment #7 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Dominique d'Humieres from comment #6)
> (In reply to Harald Anlauf from comment #1)
> > Thus the assignment from the allocatable function result is broken.
>
> Is it true?
I looked at the discussion in the Intel Forum (c.f. comment #5) and I have
to admit that I am unsure. Steve Lionel quotes the first two phrases of
12.3.3 Characteristics of function results
The characteristics of a function result are its type, type parameters (if
any), rank, whether it is polymorphic, whether it is allocatable, whether it is
a pointer, whether it has the CONTIGUOUS attribute, and whether it is a
procedure pointer. If a function result is an array that is not an allocatable
or pointer, its shape is a characteristic.
(I checked this with the F2k8 draft).
Steve argues that it does not say whether its actual bounds are a
characteristic. If you assume that only the shape matters, then
the gfortran behavior is not a bug. I think it is up to the experts
to discuss this and maybe submit an interpretation request.
More information about the Gcc-bugs
mailing list