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

Ifort 2021.12.0 -nostand erroneous behavior

AnttiR
Beginner
459 Views

The new ifort compiler (ifort --version output: ifort (IFORT) 2021.12.0 20240222) seems to have erroneous behavior of -nostand and -stand none. It seems that these options are the same as -stand f90 instead of  not checking against the standard. E.g. file test.f90 with code

module test
interface
function recvString(str, length) bind(c, name="recvString")
use, intrinsic :: iso_c_binding, only : c_int, c_ptr
integer(c_int) :: recvString
type(c_ptr), value :: str
type(c_ptr), value :: length
end function recvString
end interface
end module

outputs

test.f90(5): warning #8076: A proc-language-binding-spec is not standard Fortran 90.
function recvString(str, length) bind(c, name="recvString")
-----------------------------------------^
test.f90(11): warning #7410: Fortran 90 does not allow this keyword. [VALUE]
type(c_ptr), value :: str
--------------------------------^
test.f90(13): warning #7410: Fortran 90 does not allow this keyword. [VALUE]
type(c_ptr), value :: length
--------------------------------^

With e.g. -stand f03 and -stand f18 the warning are not produced. From our full code, other similar warnings and errors of the code not being Fortran 90 are produced (the errors disappear with e.g. -stand f18). Ifort version 2021.8.0 20221119 works correctly.

Labels (1)
1 Solution
Barbara_P_Intel
Employee
348 Views

I filed a bug report, CMPLRLLVM-57612. I see the same behavior with ifx.

This is a regression in the current release 2024.1. I don't see that message with the 2024.0 release.

Thank you for reporting this with a simple reproducer. We'll let you know when it's fixed.



View solution in original post

0 Kudos
2 Replies
Barbara_P_Intel
Employee
364 Views

That's bizarre! I'll investigate.

 

0 Kudos
Barbara_P_Intel
Employee
349 Views

I filed a bug report, CMPLRLLVM-57612. I see the same behavior with ifx.

This is a regression in the current release 2024.1. I don't see that message with the 2024.0 release.

Thank you for reporting this with a simple reproducer. We'll let you know when it's fixed.



0 Kudos
Reply