Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
223 Views

Using /stand:f18 with ISO_FORTRAN_ENV

Dear all,

This may be a minor error, or it may be something a standards committee has not told us?

I hope the following program and comments are self explanatory.

program test_standf18
use, intrinsic :: iso_fortran_env
implicit none
print *, compiler_options()
print *, compiler_version()
end program test_standf18

! Windows 10
! Microsoft Visual Studio Community 2019 Version 16.7.3
!
! Compile and run "out of the box"
!Compiling with Intel(R) Visual Fortran Compiler 19.1.2.254 [Intel(R) 64]...
!test_standf18 - 0 error(s), 0 warning(s)
! program output:
! /nologo /debug:full /Od /warn:interfaces /module:x64\Debug\ /object:x64\Debug\
! /Fdx64\Debug\vc160.pdb /traceback /check:bounds /check:stack /libs:dll /threads
!  /dbglibs /c /Qlocation,link,C:\Program Files (x86)\Microsoft Visual Studio\201
! 9\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64 /Qm64
! Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(
! R) 64, Version 19.1.2.254 Build 20200623

! Note that VS reports compiler options as follows
!/nologo /debug:full /Od /warn:interfaces /module:"x64\Debug\\" /object:"x64\Debug\\" 
!/Fd"x64\Debug\vc160.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c
!
! OK, now add /stand:f18 to the compiler options:
!Compiling with Intel(R) Visual Fortran Compiler 19.1.2.254 [Intel(R) 64]...
!test_standf18.f90
!C:\...\test_standf18.f90(4): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_OPTIONS]
!C:\...\test_standf18.f90(5): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_VERSION]
!
! The output:
! /nologo /debug:full /Od /stand:f18 /warn:interfaces /module:x64\Debug\ /object:
! x64\Debug\ /Fdx64\Debug\vc160.pdb /traceback /check:bounds /check:stack /libs:d
! ll /threads /dbglibs /c /Qlocation,link,C:\Program Files (x86)\Microsoft Visual
!  Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64 /Qm64
! Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(
! R) 64, Version 19.1.2.254 Build 20200623

 

Why does adding compiler option /stand:f18 cause a warning to be issued in regard to both "compiler_options()" and "compiler_version()"

BW & stay safe

Norman

0 Kudos
9 Replies
Highlighted
Valued Contributor III
218 Views

Probably because f2018 is only partially implemented at this point in time. That is not unusually f2003 took about 10 years! Things are getting better but mainly I think the standards guys are being more cautious/realistic. 

https://software.intel.com/content/www/us/en/develop/articles/intel-fortran-compiler-support-for-for...

0 Kudos
Highlighted
Black Belt Retired Employee
200 Views

I have seen many similar issues over the years. When a new standards checking option is provided, the compiler developers need to review all the checks to make sure they are still relevant. I don't recall how this bit is coded in the Intel compiler, but in the end it's just a minor compiler bug - please report it.

0 Kudos
Highlighted
Honored Contributor I
199 Views

.. Why does adding compiler option /stand:f18 cause a warning to be issued in regard to both "compiler_options()" and "compiler_version()" ..

A compiler bug?

That is what I think.  And I had filed a bug report when compiler 19.0 was released last year, Fall 2019.  It's still outstanding.

My take is Intel Fortran team introduced this bug when they tried to implement the Fortran 2018 feature that calls for, "A processor is required to report use of a .. nonstandard procedure from a standard intrinsic module."  They ended up marking the standard-specified procedures from the standard intrinsic module as nonstandard as well

 

0 Kudos
Highlighted
Valued Contributor III
183 Views

So are we saying that f2018 is fully implemented now?

0 Kudos
Highlighted
Honored Contributor I
180 Views

As you would know, Intel Fortran team has long been implementing Fortran 2018 features: enhanced interoperability with C was among the first severl years ago.

Here's the list with 19.1 release: https://software.intel.com/content/www/us/en/develop/articles/intel-fortran-compiler-191-for-windows...

You can look online for the prior major revision i.e., 19.0 - Intel doesn't make it easy to find things, do they!?  Plus the links keep changing.

Anyways, note the line in the Release Notes, "The compiler will now diagnose the use of nonstandard intrinsic procedures and modules as required by Fortran 2018" - as I mentioned earlier, my take is a bug with this implementation is what leads to the spurious warning listed by OP in the original post.

 

0 Kudos
Highlighted
Moderator
173 Views

The Fortran compiler that is now in beta, completes our implementation of Fortran 2018.  Here are the Release Notes with the list of new F2018 features and instructions on how to download the beta compiler.

Please file a bug for anything amiss.

 

0 Kudos
Highlighted
Black Belt Retired Employee
164 Views

The beta compiler still shows this behavior:

D:\Projects>ifort /stand:f18 t.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 2021.1 Beta Build 20200602
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

t.f90(4): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_OPTIONS]
print *, compiler_options()
---------^
t.f90(5): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_VERSION]
print *, compiler_version()
---------^

 

The instructions are to report bugs in this forum. So consider it duly reported!

0 Kudos
Highlighted
Moderator
128 Views

I filed a bug, CMPLRIL0-33374.  I'll post more when there's a fix.

 

0 Kudos
Highlighted
Valued Contributor III
110 Views

@ff thanks for the link. I had made a couple of searches previously and failed to find that link for f18 support. Things don't readily jump at you on the intel system and you often find broken links or out of date material. I think the constant changing of systems and locations make the google indexing task harder.

0 Kudos