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

Data Polymorphism in Intel Fortran Compiler 11.1

Fahim_F_
Novice
586 Views

hello,

I have a simple code which defines a set of clsses. Please have a look at the attached file. I define a polymorphic variable using an allocatable class by " class (*) , allocatable :: alc ". The code compiles but when allocating the class at runtime, the code crashes and produces unhandeled exception error.

Is this a limitation of  Intel Fortran Compiler 11.1 or I am doing something wrong?? I also tried to define a polymorphic pointer and point it to "circle" or "rect" classes, but It produced the same error. Would you please help me with this issue. How can I define a polymorphic variable which may be either kinds of all "shape", "rect" or "circle" classes?

Following this problem, I am wondering if the Intel Fortran Compiler 11.1 does infact include all the standard features of Fortran 2003?

Thank you in advance

0 Kudos
4 Replies
IanH
Honored Contributor III
586 Views

That compiler is rather old from the point of view of using new language features - you are four releases (and numerous updates) behind.  I've seen (and benefited from) many fixes in this area over the last few years (and presumably there are some more coming!).

They (Intel) don't claim full F2003 conformance with the current compiler, let alone older versions.

0 Kudos
Fahim_F_
Novice
586 Views

Thank you Ian for your quick response.

0 Kudos
Steven_L_Intel1
Employee
586 Views

Your program executes correctly using the current compiler version.  CLASS was new in version 11.1 and, as Ian correctly notes, there were errors in the initial implementation.

0 Kudos
Fahim_F_
Novice
586 Views

Thank you very much Steve,

0 Kudos
Reply