- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code produces a bogus warning when compiled with -stand=f08:
program p
implicit none
integer, parameter :: wp = selected_real_kind (6)
real(wp), parameter :: x(1) = huge (0._wp)
real(wp) :: y(1) = huge (0._wp)
real(wp) :: z(1) = huge (0.0)
end
E..g.: ifort 2021.6.0 / ifx 2022.1.0:
% ifort ifort-init.f90 -stand=f08
ifort-init.f90(4): warning #6750: F2008 does not allow an initialization expression which includes a specification inquiry of a type parameter / an array bound can not be within the same entity-decl. [X]
real(wp), parameter :: x(1) = huge (0._wp)
-------------------------^
ifort-init.f90(5): warning #6750: F2008 does not allow an initialization expression which includes a specification inquiry of a type parameter / an array bound can not be within the same entity-decl. [Y]
real(wp) :: y(1) = huge (0._wp)
-------------------------^
ifort-init.f90(6): warning #6750: F2008 does not allow an initialization expression which includes a specification inquiry of a type parameter / an array bound can not be within the same entity-decl. [Z]
real(wp) :: z(1) = huge (0.0)
-------------------------^
To the best of my knowledge this is valid F95 and accepted by NAG and others. No warning for -stand=f18. The warning does not really make sense to me.
Ifort 16.0.8.266 was silent; ifort 17.0.2.174 and newer releases show the above warning.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug report on this, CMPLRIL0-34763. I'll let you know when it's fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello. The same wrong warning occurs with `-stand f03`.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bogus error message is removed now in the latest release of ifort and ifx in oneAPI HPC Toolkit 2023.1. It's gone for -stand=[f03|f08|f18].
Please install the compiler. It was released just this week.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page