- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
the following reproducer shows a oddity with the %kind inquiry of particularly a complex variable:
program p
implicit none
real :: r(3)
complex :: z(3)
logical :: l(3)
character(5) :: s(7)
print *, r%kind ! all of these are OK ...
print *, l%kind
print *, s%kind
print *, s%len
print *, z%kind
call bla(r%kind)
call bla(l%kind)
call bla(s%kind)
call bla(s%len) ! ... until here
call bla(z%kind) ! this one accepted by ifort 2021.13.1, rejected by ifx
contains
subroutine bla(r)
integer, intent(in) :: r
print *, "r=", r
end subroutine
end
While ifort accepts the code and prints expected values, the indicated line is rejected by ifx (up to 2025.0):
% ifx ifx-kind-inquiry.f90
ifx-kind-inquiry.f90(16): error #8748: Type parameter inquiry must not be used in a leftside context. [KIND]
call bla(z%kind) ! accepted by ifort 2021.13.1, rejected by ifx
-------------^
compilation aborted for ifx-kind-inquiry.f90 (code 1)
This error cannot be right...
Thanks,
Harald
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have escalated this case to compiler engineering for a fix. Thanks for the report and test case.
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