- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the following sample shows that ifort rejects pointer rank remapping within a FORALL construct. Simple pointer assignments seems to work, though.
program p
implicit none
type ta
integer, pointer :: ip1(:)
integer, pointer :: ip2(:,:)
end type ta
type tb
integer, pointer :: ip2(:,:)
end type tb
type(ta), allocatable :: z(:)
type(tb), allocatable :: y(:)
integer :: i, n1=2, n2=2
allocate (y(10),z(10))
do i = 1,10
y(i)% ip2(1:n1,1:n2) => z(i)% ip1
end do
do, concurrent (i=1:10)
y(i)% ip2(1:n1,1:n2) => z(i)% ip1
end do
forall (i=1:10)
y(i)% ip2(1:n1,1:n2) => z(i)% ip1 ! Rejected
! y(i)% ip2 => z(i)% ip2 ! This would be accepted
end forall
end
ifort 2021.7.0 gives:
ifort-forall.f90(24): error #6697: The leftside of a forall-assignment is invalid. [IP2]
y(i)% ip2(1:n1,1:n2) => z(i)% ip1 ! Rejected
-----------^
compilation aborted for ifort-forall.f90 (code 1)
NAG 7.1 accepts the code without any complaint.
Thanks,
Harald
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the report. I filed a bug for you on this, CMPLRLLVM-41086. I'll post when it's fixed.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll get a bug report on this one. Thank you for sending this to us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the report. I filed a bug for you on this, CMPLRLLVM-41086. I'll post when it's fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No more erroneous error message for this reproducer for either ifort or ifx. Try the Fortran compilers in oneAPI 2023.1 that were released 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