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

Object bound procedure: IVF defies the F2003 Standard (or does it)?

6 Replies
Ron_Green
Moderator
739 Views

Yes, the 11.0 compiler is limited in it's F2003 support, it is a partial implementation. The ReleaseNotes and Language Reference documents should be consulted for the supported F2003 features.

The 11.1 compiler will have the majority of F2003 features. So do not expect major F03 fixes in the 11.0 compiler as when the 11.1 compiler is released it will supercede the 11.0 compiler. the F03 effort is focused on 11.1, nothing new is planned for 11.0.

And I must take issue with a comment you made: "However, IVF does not support polymorphic entities right now, so it may be ok but a standard conforming compiler, such as XL Fortran, would give error for such code. "

Keep in mind that the Standard dictates that a standard-compliant compiler will accept standard-compliant code. That is all. If the code is valid and you claim your compiler complies, it must correctly compile the code. The standard does NOT say what, if anything, the compiler should do with non-conforming code. Obviously we'd like to generate logical and helpful warning and error messages, but these are not strictly required.

ron

0 Kudos
abhimodak
New Contributor I
739 Views
Hi Ron

I think you are missing my point, and my intention, here..

I happened to note the deficiency related to PASS and NOPASS with procedure pointers back when 11.0.066was released. In an earlier post on this forum (and later, intel premier support) mr. Kevin Davis from Intel acknowledged it. I was told that it would be fixed after 11.0.066. At the same time, I had also reported the compiler error when PASS was used with or without an extra argument.

After getting a notification from IPS that a fix has been made, I found that what was claimed to be fixed in 11.0.72 was in fact not fixed. As of yesterday, IPS had acknowledged that as well.

Aside from the fact that the pass-object dummy argument is giving failure to compile in debug mode, while it has no problems in release mode, without implementation of CLASS, the IVF would allow something that is non-standard and it will make the program non-portable.

I am inclined to think that mere jumps of words like what do with non-standard etc etc are not very constructive. May be my mention of XLFortran was offensive. If so, my apologies.

Can you please tell me where the F2003 related documentation is in version 11.0.0* versions? All I can see is a list of the features but nothing more. Probably, I am not searching it correctly.

Abhi
0 Kudos
IanH
Honored Contributor III
739 Views

Keep in mind that the Standard dictates that a standard-compliant compiler will accept standard-compliant code. That is all. If the code is valid and you claim your compiler complies, it must correctly compile the code. The standard does NOT say what, if anything, the compiler should do with non-conforming code. Obviously we'd like to generate logical and helpful warning and error messages, but these are not strictly required.

ron


Section 1.5 of the F2003 standard seems to put a few requirements on the processor in terms of detection and reporting. This might apply here because it is a constraint (C453) that's being violated?

Eagerly awaiting 11.1!

0 Kudos
Ron_Green
Moderator
739 Views
Quoting - abhimodak
Hi Ron

I think you are missing my point, and my intention, here..

I happened to note the deficiency related to PASS and NOPASS with procedure pointers back when 11.0.066was released. In an earlier post on this forum (and later, intel premier support) mr. Kevin Davis from Intel acknowledged it. I was told that it would be fixed after 11.0.066. At the same time, I had also reported the compiler error when PASS was used with or without an extra argument.

After getting a notification from IPS that a fix has been made, I found that what was claimed to be fixed in 11.0.72 was in fact not fixed. As of yesterday, IPS had acknowledged that as well.

Aside from the fact that the pass-object dummy argument is giving failure to compile in debug mode, while it has no problems in release mode, without implementation of CLASS, the IVF would allow something that is non-standard and it will make the program non-portable.

I am inclined to think that mere jumps of words like what do with non-standard etc etc are not very constructive. May be my mention of XLFortran was offensive. If so, my apologies.

Can you please tell me where the F2003 related documentation is in version 11.0.0* versions? All I can see is a list of the features but nothing more. Probably, I am not searching it correctly.

Abhi

I understand now. Yes, I believe I agree with you that this is non-conformant code. I will open a bug report on this.

documentation: currently only the supported features are listed in the ReleaseNotes. What is needed is an update to the Language Reference. This is planned for the product in an update after 11.1 launches.

ron
0 Kudos
yamajun2
Beginner
739 Views
Quoting - abhimodak
Hi Ron

I think you are missing my point, and my intention, here..

I happened to note the deficiency related to PASS and NOPASS with procedure pointers back when 11.0.066was released. In an earlier post on this forum (and later, intel premier support) mr. Kevin Davis from Intel acknowledged it. I was told that it would be fixed after 11.0.066. At the same time, I had also reported the compiler error when PASS was used with or without an extra argument.

After getting a notification from IPS that a fix has been made, I found that what was claimed to be fixed in 11.0.72 was in fact not fixed. As of yesterday, IPS had acknowledged that as well.

Aside from the fact that the pass-object dummy argument is giving failure to compile in debug mode, while it has no problems in release mode, without implementation of CLASS, the IVF would allow something that is non-standard and it will make the program non-portable.

I am inclined to think that mere jumps of words like what do with non-standard etc etc are not very constructive. May be my mention of XLFortran was offensive. If so, my apologies.

Can you please tell me where the F2003 related documentation is in version 11.0.0* versions? All I can see is a list of the features but nothing more. Probably, I am not searching it correctly.

Abhi

Hi,

At least, you can avoid internal compile error in DEBUG mode by adding ABSTRACT INTERFACE.
But anyway we have to wait for ver.11.1.

[cpp]!
!===================
!
Module MyType

Implicit None

Type BaseType
Integer :: n
Real(8) :: r
End Type BaseType

!---------------------------------------
ABSTRACT INTERFACE
 Subroutine t_view(BASE, a)
 IMPORT BaseType
 Type(BaseType), Intent(IN) :: BASE
 Real :: a
 END SUBROUTINE t_view
END INTERFACE
!---------------------------------------

Contains

Subroutine View(BASE, a)
!Subroutine View(BASE)

Implicit None

Type(BaseType), Intent(IN) :: BASE
Real :: a

Print *, BASE%n
Print *, BASE%r

Print *, a

End Subroutine View

End Module MyType
!
!====================
!
Module ExtendType

Use MyType

Type, Extends(BaseType) :: XType
!---------------------------------------
Procedure(t_view), Pointer, Pass :: Show
!---------------------------------------
End Type XType


Contains

Subroutine Initialize(XTEND)

Implicit None

Type(XType), Intent(OUT) :: XTEND

XTEND%n = 0
XTEND%r = 1.0

XTEND%Show => View

End Subroutine Initialize

End Module ExtendType
!
!====================
!
Program Test_TypeWithProc

Use ExtendType

Implicit None

Type(XType) :: XTEND

Real :: a = 1.0

Call Initialize(XTEND)

Call XTEND%Show(a)
!Call XTEND%Show

End Program Test_TypeWithProc[/cpp]

0 Kudos
Steven_L_Intel1
Employee
739 Views
Intel Fortran does not claim to be a F2003 compliant compiler. It is a F95 compiler with many F2003 features.

The particular issue here is related to a partial implementation of F2003. In 11.0, you cannot write a standard-conforming program that uses procedure pointers in a derived type. This will be resolved in 11.1.
0 Kudos
Reply