Data Polymorphism in Intel Fortran Compiler 11.1

Data Polymorphism in Intel Fortran Compiler 11.1


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

Downloadapplication/octet-stream console1.f901.21 KB
5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Thank you Ian for your quick response.

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.

Retired 12/31/2016

Thank you very much Steve,

Leave a Comment

Please sign in to add a comment. Not a member? Join today