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

Compiler directive scope changes

fohfab
Beginner
465 Views
Has there been a change in the 'scope' of the compiler souce format directive NOFREEFORM in Intel 12.1?

The reason I ask is that I have a .f90 file with NOFREEFORM dirctive, which includes a .inc file (which also has the NOFREEFORM directive. But source after this include is being compiled as if it were free fomat (and so producing errors). The project format is set to be 'use source extension'.

It looks like when returning to the .f90 file, the format is returning to the project setting rather than the compiler directive at the top of the source file.

Can you confirm this and is it a bug?
0 Kudos
7 Replies
Steven_L_Intel1
Employee
465 Views
I can't reproduce this. Please attach a test case.
0 Kudos
fohfab
Beginner
465 Views
I can't reproduce it in a test case either! I need to work on it and send you something that shows the error.
0 Kudos
fohfab
Beginner
465 Views
That was interesting. It looks like 'the bug' is connected to the /warn:interfaces switch. If you unzip the attached files and type ifort /c /fpp /warn:interfaces mf_load.f90 you will see a compiler error that implies that the format type has reverted to free format after the include files. If you add !DEC$ NOFREEFORM after the include then the compiler is happy!
0 Kudos
Steven_L_Intel1
Employee
465 Views
Interesting. We fixed a bug very much like this in 12.0 and the test case for that one still works, but yours does not. I will report this to the developers.
0 Kudos
fohfab
Beginner
465 Views
Thanks Steve. I will leave it with you. We have a workround in either switching off the /warn:interfaces or adding the NOFREEFORM compiler directive after the include, so we can continue with version 12.1.
Thanks.
0 Kudos
Steven_L_Intel1
Employee
465 Views
Escalated as DPD200174491.
0 Kudos
Steven_L_Intel1
Employee
465 Views
Fixed for a future release.
0 Kudos
Reply