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

error #6405: The same named entity from different modules and/or program units cannot be referenced. [A120]

kramer__walter
Beginner
2,462 Views

Hello,

I am getting the following error message:

error #6405: The same named entity from different modules and/or program units cannot be referenced. [A120]

However, A120 is in a separate source file (not in a module) and is defined only once in the program.

A120 is called from a subroutine E25 andan INTERFACE block is created in E25.
FP in the INTERFACE block is an integer with value 4 which isdefined in ERR_HAND. Since ERR_HAND is also used insubroutine E25, Itried to remove USE ERR_HAND form the INTERFACE block, but that didn't work.

I am bit confused. Any suggestions?

Thanks,

Walter Kramer

INTERFACE
REAL(FP) FUNCTION A120(TAT,ZTU)
USE ERR_HAND
IMPLICIT NONE
REAL(FP), INTENT(IN) :: TAT
CHARACTER(ISP), INTENT(IN) :: ZTU
END FUNCTION
END INTERFACE

0 Kudos
10 Replies
Steven_L_Intel1
Employee
2,462 Views
Does turning off Diagnostics > Check Routine Interfaces make the problem go away? Can you attach a ZIP of a project that demonstrates the problem? Please be sure to include any __GENMOD.mod files from the Debug subfolder.
0 Kudos
kramer__walter
Beginner
2,462 Views
Yes, turning off "Diagnostics > Check Routine Interfaces" make the problem go away. Alsohiding the A120_GEMOD.mod file for the compiler (with "Diagnostics > Check Routine Interfaces" switched on) makes the problem go away.
I will try to reproduce this issue in a small project suitable for uploading, but I am not sure that I will succeed, because another subroutine is also calling A120 (with A120 interface exposed through an INTERFACE block) and compiles without a problem. Difference is that the routine that doesn't compile is contained in a module, whereas the other is in a separate source file.

Thanks,

Walter
0 Kudos
kramer__walter
Beginner
2,462 Views
I managed to repoduce the issue in a small project, however I don't manage to upload it. I created a folder for upload, but if I press the "Edit" button it doesn't open a file upload dialog, but the "Edit" button switches to an "Update" button.
Anyway the problem is related to calling the function A120 twice. If the function is called only once the problem is not there.

Walter
0 Kudos
Steven_L_Intel1
Employee
2,462 Views
Ok, this sounds familiar - we fixed a bug like this in the first 12.0 update. Which version are you using?
0 Kudos
kramer__walter
Beginner
2,462 Views
I am using:

Intel Visual Fortran Compiler XE on IA-32, version 12.0.5 Package ID: w_fcompxe_2011.5.221.

I also managed to attach the project.

Walter
0 Kudos
Steven_L_Intel1
Employee
2,462 Views
Thanks - I can reproduce this. Looks like a subtle variation on the earlier bug, but this one baffles me as there is an explicit interface, where the old one needed an implicit interface to trigger. I will escalate this to the developers. Issue number is DPD200172565.
0 Kudos
kramer__walter
Beginner
2,462 Views
Still no news about this one?

Walter Kramer
0 Kudos
Steven_L_Intel1
Employee
2,462 Views
No, sorry. I will ping the developer about it.
0 Kudos
Steven_L_Intel1
Employee
2,462 Views
I am informed that this problem has been fixed for a release later this year.
0 Kudos
kramer__walter
Beginner
2,462 Views
Thanks

Walter Kramer
0 Kudos
Reply