Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Size() intrinsic

galatyp
Beginner
434 Views
function StError(DataArray)
implicit none
Type(typData),intent(in) :: DataArray(:)
Type(typData), dimension(Size(DataArray)) :: StError
.
.
.
end function
this works with other fortran compilers, but not in Intel Fortran Compiler. ThoughDataArrayhas a size of 4000rows, compiler isn't allocating StError. Is there any other way except classical allocate() way ?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
434 Views
You did not supply a complete program, but I'll take a guess based on what I saw when I tried making my own.

Because function stError returns an array (and because it has a deferred-shape array argument), an explicit interface is required. If you call it without a proper explicit interface, then the results are unpredictable.
0 Kudos
Reply