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.
29281 Discussions

Error: Dynamic allocation inside a structure for old version ifc

Wee_Beng_T_
Beginner
338 Views

hi,

i've a code which use dynamic allocation inside a structure, something like:

type block

integer :: size_x,size_y

real(8), allocatable :: p(:,:)

end type block

type(block), allocatable :: blk(:)

it works when i compile using ifort. however when i tried to compile it on another of my university's server which uses ifc, it gives me an error 24, syntax error.

is this feature not supported in ifc, which is an older version of the compiler?

thank you!

0 Kudos
1 Reply
Steven_L_Intel1
Employee
338 Views
Exactly right. That feature is from the Fortran 2003 standard and ifc 7.x and earlier does not support it. You can use POINTER instead of ALLOCATABLE, but the semantics are subtlly different, especially if you assign one variable of type block to another.
0 Kudos
Reply