Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automatic array function result

89 views
Skip to first unread message

vladim...@gmail.com

unread,
Oct 9, 2015, 8:59:55 AM10/9/15
to
Hello,

in this question http://stackoverflow.com/questions/33019941/compiler-difference-between-gfortran-and-ifort-allocatable-arrays-and-global-va an issue came up, whether it is permitted to have an internal function, such as

function initialize_array() result(a)
real :: a(N,3)
a=1
end function

where N comes from host association. Intel and Oracle compile that, gfortran tells us

real :: a(N,3)
1

Error: Variable 'n' cannot appear in the expression at (1)

Is this code standard conforming?

steve kargl

unread,
Oct 9, 2015, 11:17:17 AM10/9/15
to
Seems to be a bug in gfortran.

--
steve
0 new messages