Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Size() intrinsic

galatyp
Beginner
440 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
440 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