Multiple definitions of floating-point exception parameters such as FPE_M_TRAP_OVF


Reference Number : dpd200049774

Version : Intel Fortran Compiler versions 10 and 11


Operating System : Windows*, Linux*, Mac OS* X


Problem Description : Errors such as the following may occur when accessing parameters related to floating-point exceptions via the compiler-provided modules IFLPORT or IFCORE and IFPORT:

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

Cause:    Some parameters related to floating-point exceptions are defined in both the IFCORE and IFPORT modules. If both modules are accessed by use association and one of these parameters is referenced in user code, the compiler does not know which of the conflicting definitions to take, (even if the definitions are the same), and emits an error. Note that the IFLPORT module itself uses both the IFCORE and IFPORT modules.

The following are examples of parameters related to floating-point exceptions whose definitions appear in both the IFLCORE and the IFLPORT modules:

! -----------------------------------------------------------------
! Floating-Point Inquiry and Control Routines
! -----------------------------------------------------------------
INTEGER(4), PARAMETER :: FOR_K_FPE_CNT_UNDERFLOW = Z'00000001'
INTEGER(4), PARAMETER :: FOR_K_FPE_CNT_OVERFLOW = Z'00000002'
INTEGER(4), PARAMETER :: FOR_K_FPE_CNT_DIVIDE0 = Z'00000003'
INTEGER(4), PARAMETER :: FOR_K_FPE_CNT_INVALID = Z'00000004'
INTEGER(4), PARAMETER :: FOR_K_FPE_CNT_ARRAY_MAX = Z'00000004'

INTEGER(4), PARAMETER :: FPE_M_TRAP_UND = Z'00000001'
INTEGER(4), PARAMETER :: FPE_M_TRAP_OVF = Z'00000002'
INTEGER(4), PARAMETER :: FPE_M_TRAP_DIV0 = Z'00000004'
INTEGER(4), PARAMETER :: FPE_M_TRAP_INV = Z'00000008'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_00 = Z'00000010'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_01 = Z'00000020'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_02 = Z'00000040'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_03 = Z'00000080'
INTEGER(4), PARAMETER :: FPE_M_MSG_OVF = Z'00000100'
INTEGER(4), PARAMETER :: FPE_M_MSG_UND = Z'00000200'
INTEGER(4), PARAMETER :: FPE_M_MSG_DIV0 = Z'00000400'
INTEGER(4), PARAMETER :: FPE_M_MSG_INV = Z'00000800'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_04 = Z'00001000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_05 = Z'00002000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_06 = Z'00004000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_07 = Z'00008000'
INTEGER(4), PARAMETER :: FPE_M_ABRUPT_UND = Z'00010000'
INTEGER(4), PARAMETER :: FPE_M_ABRUPT_OVF = Z'00020000'
INTEGER(4), PARAMETER :: FPE_M_ABRUPT_DIV0 = Z'00040000'
INTEGER(4), PARAMETER :: FPE_M_ABRUPT_INV = Z'00080000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_08 = Z'00100000' !keep for legacy
INTEGER(4), PARAMETER :: FPE_M_ABRUPT_DMZ = Z'00100000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_09 = Z'00200000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_10 = Z'00400000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_11 = Z'00800000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_12 = Z'01000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_13 = Z'02000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_14 = Z'04000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_15 = Z'08000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_16 = Z'10000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_17 = Z'20000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_18 = Z'40000000'
INTEGER(4), PARAMETER :: FPE_M_RESERVED_19 = Z'80000000'
and
!FPE FLAGS
PARAMETER (FOR_K_REENTRANCY_NONE = Z'00000000')
PARAMETER (FOR_K_REENTRANCY_ASYNCH = Z'00000001')
PARAMETER (FOR_K_REENTRANCY_THREADED = Z'00000002')
PARAMETER (FOR_K_REENTRANCY_INFO = Z'00000003')


Resolution Status :  The duplicate definitions have been removed in version 12 of the Intel Fortran Compiler, and also in versions 11.1.069 and later.

In older compilers, the issue may be worked around in one of the following ways:

• If the compilation unit does not require both of IFCORE and IFPORT, only USE one of these, and do not USE IFLPORT.

• If both of IFCORE and IFPORT are required, then rename one of the module definitions for each parameter that is referenced. There is no need to rename parameters that are not referenced in user code. For example, to work around the two error messages above:

USE IFPORT, DONTUSE1=>FPE_M_TRAP_OVF
USE IFPORT, DONTUSE2=>FOR_K_REENTRANCY_NONE

• If multiple applications are affected, you might wish to consider deleting the duplicate definitions from iflport.f90, (keeping a copy of the original!), and recompiling to recreate the module file ifport.mod.



[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
For more complete information about compiler optimizations, see our Optimization Notice.