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

Wrong overriden type-bound procedure called when using multiple class inheritance levels

thomas_boehme
Nuevo Colaborador II
870 Vistas
When using multiple inheritance (ie. Base <- Ext1 <- Ext2) and Ext2 overrides a type-bound procedure defined in the base type, there seems to be a bug that can lead to calling the wrong type-bound procedure.

This happens when trying to call the overriden procedure in an instance of type Ext2 from a class pointer of type CLASS (Ext1). Then, the base routine is called rather then the overriden routine from Ext2.

See the attached VS2008 code for an example.

I would expect to get Ext2 three times, however, the result is Ext2, Base, Ext2.

Note that when the procedure is also overriden in Ext1, the correct result (Ext2 Ext2 Ext2)is obtained.

Best regards,
Thomas
0 kudos
6 Respuestas
Steven_L_Intel1
Empleados
870 Vistas

This sounds familiar - I'll look at it on Monday. Thanks for the test case.
thomas_boehme
Nuevo Colaborador II
870 Vistas

This sounds familiar - I'll look at it on Monday. Thanks for the test case.

Hi Steve,

did you have a chance to look into this? I really hope this problem gets fixed soon as we currently experience the problem in our code. It can be worked around by overriding the procedures at every level, but that's not really what we want.

regards,
Thomas
Steven_L_Intel1
Empleados
870 Vistas
Thomas,

Sorry, I missed this one in catching up. I'll get to it later today.
Steven_L_Intel1
Empleados
870 Vistas
Escalated as issue DPD200142485. This won't make Update 4, but I have asked that it be fixed for Update 5.
Steven_L_Intel1
Empleados
870 Vistas
This didn't make Update 5, as the initial fix created some other problems. It will be fixed for Update 6.
Steven_L_Intel1
Empleados
870 Vistas
And indeed it is.
Responder