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

USE statement exports symbols from module

OysteinO
Beginner
797 Views
I have had problems with all updates after 12.1.0. The compile time has increased significantly. It now takes more than 12 hours to compile libraries andprograms that earlier took ~10 minutes. I believe I have tracked down the cause.
I have attached three cases where the compiler should detect errors. These cases all contain a module called HS2Error, which exports the derived type HSError.
Each case has a separete HS2ExportsError module. The first case contains a derived type HSExportsError with a type bound procedure that returns a HSError. The "USE HS2ExportsErorr, ONLY:HSExportError"statement in the module HSCompileTest makes HSError available too.
In the second case, there is a "USE HS2Error, ONLY: HSError"statement in HS2ExportsError module, but HSError is never used. Again HSerror becomes available inHSCompileTest after the "USE HS2ExportsError, ONLY:HSExportError" statement.
The third case is similar to the first, but now with a subroutine and no derived type in HS2ExportsError.
To summarize: If a function or subroutine returns a derived type in a module, then that derived type is exported from that module regardless of any USE ONLY statements. Case 2 shows that a USE ONLY statement on a derived type causes that derived type to be exported from the module with the statement. Again regardless of any USE ONLY statements. The net result is that large programs with several modules and derived types have the same symbol/derived type exported from several different modules.
0 Kudos
6 Replies
Steven_L_Intel1
Employee
797 Views
Thanks, we'll take a look. I see that a forum bug caused your name to be dropped from the post. Please log in again and add a reply so I know who reported this. Thanks.
0 Kudos
John_B__Walter
Beginner
797 Views
There appear to be problems with this forum thread as the original poster continues to show as blank even with additional replys.

Also, the list of threads shows 6 replys as I make this one, but there are only two displayed when I enter the thread.
0 Kudos
Steven_L_Intel1
Employee
797 Views
Some of the replies are "Private" which means you won't be able to see them. The blank name issue is being dealt with.
0 Kudos
OysteinO
Beginner
797 Views
Ok,

I managed to fix this after being told that the display name was not set. There is no option to set a display name when I go to My Account at https://registrationcenter.intel.com, where I registered. Furthermore, there was no link to my profile from the forums.

To fix this I looked at the html code for the forum and found my user id number. I could then open

http://software.intel.com/en-us/profile/user_id/

and set the display name.


Oystein
0 Kudos
Steven_L_Intel1
Employee
797 Views
Thanks - I can reproduce the problems and have escalated it to development. The issue ID is DPD200179332. I note that these examples correctly gave errors in the 12.0 compiler (Update 5 and earlier.)
0 Kudos
Steven_L_Intel1
Employee
797 Views
This has been fixed for a release later this year.
0 Kudos
Reply