This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: SIZE()
On Thursday 10 March 2005 11:45, Offiler, Dave wrote:
> Dear gfortran developers,
>
> This is not a bug, but perhaps in the class of 'unexpected, but not
> incorrect, behaviour'. This is just for your attention, but
> not (necessarily) for action as I'm sure there are vastly more
> important things to deal with.
>
> The issue is the return value from size() when the argument
> is an unassigned pointer - gfortran returns 1.
> This is illustrated in the attached code snippet. We feel that
> logically, size() should return zero in these cases (as the Intel and
> NAG compilers do) or a negative value. However, we accept that any
> arbitrary value could be returned - as the result is probably undefined
> according the standards. Not that it should be relied upon, or in a good
> program, even allowed to occur!
Please file this as bug. http://gcc.gnu.org/bugzilla.
Bugzilla allows bugs to be marked as "enhancements", which may be appropriate
in this case.
Paul