Is the following code fragment standard conforming if called
without the optional argument?
subroutine my_sub (stat)
integer, intent(out), optional :: stat
...
allocate(array(...), stat=stat)
It certainly is if 'allocate' were some subroutine or function
with optional argument 'stat', but then allocate isn't really
either of those things. I was surprised when my favorite
compiler rejected it.
Cheers,
Neil
--
Neil Carlson <[log in to unmask]>
|