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

can't use assume std_mod_proc_name and IEEE_VALUE

andrewmcleod
Beginner
594 Views
Hi,

I ran into problems trying to use compile a code using IEEE_VALUE, and found that it would compile only with the 'assume std_mod_proc_name' flag off.

Borrowing a test code from Steve Lionel: http://software.intel.com/en-us/forums/showpost.php?p=121153

[fortran]program test
   USE, INTRINSIC :: IEEE_ARITHMETIC
   REAL(4) :: R4
   REAL(8) :: R8
   REAL(16) :: R16

   R4 = IEEE_VALUE(R4, IEEE_QUIET_NAN)
   R8 = IEEE_VALUE(R8, IEEE_QUIET_NAN)
   R16 = IEEE_VALUE(R16, IEEE_QUIET_NAN)

   PRINT '(Z8.8/Z16.16/Z32.32)', R4, R8, R16

end program test[/fortran]

and then compiling with the following options:

> ifort -assume std_mod_proc_name -o test test.F90
/tmp/ifortzu5o1T.o: In function `MAIN__':
test.F90:(.text+0x41): undefined reference to `ieee_arithmetic_MP_ieee_quiet_nan_'
test.F90:(.text+0x48): undefined reference to `ieee_arithmetic_MP_for_ieee_value_k4_'
test.F90:(.text+0x5b): undefined reference to `ieee_arithmetic_MP_ieee_quiet_nan_'
test.F90:(.text+0x62): undefined reference to `ieee_arithmetic_MP_for_ieee_value_k8_'
test.F90:(.text+0x72): undefined reference to `ieee_arithmetic_MP_ieee_quiet_nan_'
test.F90:(.text+0x7e): undefined reference to `ieee_arithmetic_MP_for_ieee_value_k16_'

>ifort -o test test.F90
(success, code runs correctly)

> ifort -V
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

Is this a bug? I couldn't find anything about it elsewhere. I also haven't checked any other IEEE routines.

Thanks,
Andrew McLeod
0 Kudos
3 Replies
Steven_L_Intel1
Employee
594 Views
Yes, it's a bug. I'll report it.
0 Kudos
Steven_L_Intel1
Employee
594 Views
This will affect pretty much all of the intrinsic modules where the routine is implemented as a module procedure. These are declared with ATTRIBUTES DEFAULT, which ought to block the effects of std_mod_proc_name, but it doesn't. Issue ID is DPD200165972. The only workaround I can think of is to not use that option.
0 Kudos
Steven_L_Intel1
Employee
594 Views
I expect the fix for this to appear in 12.0 Update 4.
0 Kudos
Reply