Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
122 Views

false positive: -stand f18 and IEEE_SELECTED_REAL_KIND

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
Highlighted
Valued Contributor III
105 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.

 

0 Kudos
Highlighted
Beginner
95 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
Highlighted
Beginner
94 Views

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

0 Kudos
Highlighted
Moderator
70 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
Highlighted
Beginner
49 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
Highlighted
Moderator
36 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