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

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

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

AttachmentSize
Download TypeBoundProcedures.zip2.74 KB
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Steve - Intel Developer Support

Quoting - Steve Lionel (Intel)

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

Thomas,

Sorry, I missed this one in catching up. I'll get to it later today.

Steve - Intel Developer Support

Escalated as issue DPD200142485. This won't make Update 4, but I have asked that it be fixed for Update 5.

Steve - Intel Developer Support

This didn't make Update 5, as the initial fix created some other problems. It will be fixed for Update 6.

Steve - Intel Developer Support

And indeed it is.

Steve - Intel Developer Support

Leave a Comment

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