- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this right? Didn't have this problem with earlier versions....
data (arr(i),i=1,2) /-4.00e+00_dknd, -3.600e+00_dknd/
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We need a bit more context - ideally a small but complete program that shows the problem. Also, just giving the error number isn't sufficient - we need to see the actual and complete message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok here's more detail
program main
integer, parameter :: dknd = selected_real_kind(15,307) != 8-byte realkind
real(dknd) arr(2)
data (arr(i),i=1,2) /-4.00e+00_dknd, -3.600e+00_dknd/
end program
ifort ./main.f90 -stand f03
./main.f90(4): warning #8763: Fortran 2003 does not allow an expression as a DATA statement constant.
data (arr(i),i=1,2) /-4.00e+00_dknd, -3.600e+00_dknd/
-------------------------^
./main.f90(4): warning #8763: Fortran 2003 does not allow an expression as a DATA statement constant.
data (arr(i),i=1,2) /-4.00e+00_dknd, -3.600e+00_dknd/
ifort 15.0.5.223 does not give the warning but ifort 16.0.3.210 give it.
This is on Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fascinating. Definitely a compiler bug. This is just a standards warning so you can either not specify -std or disable it with -diag-disable=8763
I will report this to development to be fixed in a future release. Issue ID DPD200412104.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I expect this to be fixed in version 17.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page