Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26747 Discussions

false positive: -stand f18 and IEEE_SELECTED_REAL_KIND

Diehl__Martin
Novice
418 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
6 Replies
FortranFan
Honored Contributor II
401 Views

@Diehl__Martin ,

See this: https://community.intel.com/t5/Intel-Fortran-Compiler/Using-stand-f18-with-ISO-FORTRAN-ENV/m-p/12191...

My take is it's a compiler bug.

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

 

Diehl__Martin
Novice
391 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
------^

 

Diehl__Martin
Novice
390 Views

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

Barbara_P_Intel
Moderator
366 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!

 

Diehl__Martin
Novice
345 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
Barbara_P_Intel
Moderator
332 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.

 

Reply