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

false positive: -stand f18 and IEEE_SELECTED_REAL_KIND

Diehl__Martin
Novice
1,291 Views

There is a false positive when using IEEE_selected_real_kind in an initialization expression

warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [IEEE_SELECTED_REAL_KIND]
  integer, parameter :: pReal = IEEE_selected_real_kind(15,307)

 

The following code (when compiled with 'ifort -stand f18 test.f90' illustrates this behavior

program test
  use, intrinsic :: IEEE_arithmetic

  integer, parameter :: pReal = IEEE_selected_real_kind(15,307)

  print*, IEEE_selected_real_kind(15,307)


end program test


this is tested with ifort version 19.1.2.254

0 Kudos
8 Replies
FortranFan
Honored Contributor II
1,274 Views

@Diehl__Martin ,

See this: https://community.intel.com/t5/Intel-Fortran-Compiler/Using-stand-f18-with-ISO-FORTRAN-ENV/m-p/1219155/highlight/true#M152298

My take is it's a compiler bug.

Please submit a support request at Intel OSC if you can.

 

0 Kudos
Diehl__Martin
Novice
1,264 Views

I found one more

  function isDirectory_C(path) bind(C)                                                              
    use, intrinsic :: ISO_C_Binding, only: &                                                        
      C_INT, &                                                                                      
      C_CHAR                                                                                        
                                                                                                    
    use prec                                                                                        
                                                                                                    
    integer(C_INT) :: isDirectory_C                                                                 
    character(kind=C_CHAR), dimension(pPathLen), intent(in) :: path
  end function isDirectory_C

gives

~/DAMASK/src/system_routines.f90(25): warning #8893: The procedure used from a standard intrinsic module is not a standard intrinsic module procedure.   [C_INT]
      C_INT, &
------^
~/DAMASK/src/system_routines.f90(26): warning #8893: The procedure used from a standard intrinsic module is not a standard intrinsic module procedure.   [C_CHAR]
      C_CHAR
------^

 

0 Kudos
Diehl__Martin
Novice
1,263 Views

I have a shared license and cannot submit bugs. Would be great if anyone could do that for me

0 Kudos
Barbara_P_Intel
Moderator
1,239 Views

I'll file a bug or two, but first can you give me a complete reproducer for the second issue?  This one is missing the module file and a function return value.

Thank you!

 

0 Kudos
Diehl__Martin
Novice
1,216 Views

Ok this one is a little bit more complicated. Actually, the warning comes from an interface.

I could not really design a 'minimal example', but the attached files reproduce the warnings

ifort -stand f18 -c prec.f90
ifort -stand f18 -c system_routines.f90
0 Kudos
Barbara_P_Intel
Moderator
1,203 Views

Thank you for the reproducer.  I filed a bug on your behalf, CMPLRIL0-33441.  I'll let you know when it's fixed.  

A major release of the Fortran compiler will be done before the end of 2020. Please don't look for the fix there.  The code freeze already happened.

 

0 Kudos
Barbara_P_Intel
Moderator
818 Views

The false positives reported when using the -stand f18 compiler option are fixed in the Fortran compiler 2021.5.0 that was released as part of oneAPI 2022.1.   Please give it a try!

HAPPY HOLIDAYS!

 

0 Kudos
Diehl__Martin
Novice
803 Views

thanks, I can confirm that there is no false positive for both compilers (ifx and ifort).

 

Happy holidays!

0 Kudos
Reply