* Documentation update? gfortran return the size of an assumed-rank dummy argument
@ 2015-10-29 18:22 Damian Rouson
0 siblings, 0 replies; only message in thread
From: Damian Rouson @ 2015-10-29 18:22 UTC (permalink / raw)
To: GNU GFortran
All,
The transcript below shows that gfortran returns 1 for the size of an assumed-rank dummy argument associated with a scalar actual argument, which is the behavior I had hoped to see. I assume this means the following documentation needs to be updated to reflect that the first argument to SIZE need be an array (unless an assumed-rank dummy argument is classified as an array):
https://gcc.gnu.org/onlinedocs/gfortran/SIZE.html
$ cat size-assumed-rank.f90
program main
implicit none
real :: a
call foo(a)
contains
subroutine foo(x)
real, intent(in) :: x(..)
print *,size(x)
end subroutine
end program
$ gfortran size-assumed-rank.f90
n$ ./a.out
1
localhost:Desktop rouson$ gfortran --version
GNU Fortran (MacPorts gcc6 6-20151018_0) 6.0.0 20151018 (experimental)
________________________________
Damian Rouson, Ph.D., P.E.
President, Sourcery Institute
http://www.sourceryinstitute.org
+1-510-600-2992 (mobile)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-29 18:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-29 18:22 Documentation update? gfortran return the size of an assumed-rank dummy argument Damian Rouson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).