- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code is rejected by ifort/ifx although it is valid F2008+:
subroutine s (ptr1, ptr2)
real, pointer :: ptr1(:), ptr2(:,:)
print *, associated (ptr1,ptr2)
print *, associated (ptr2,ptr1)
end
I get:
ifort_associated_target.f90(3): error #6376: The shapes of the arguments do not conform. [ASSOCIATED]
print *, associated (ptr1,ptr2)
----------------------------^
ifort_associated_target.f90(4): error #6376: The shapes of the arguments do not conform. [ASSOCIATED]
print *, associated (ptr2,ptr1)
----------------------------^
compilation aborted for ifort_associated_target.f90 (code 1)
See e.g. F2018:16.9.16 for details on the expected result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry. I disagree, and so does NAG Fortran:
D:\Projects>nagfor -c t.f90
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7108
Evaluation trial version of NAG Fortran Compiler Release 7.1(Hanzomon) Build 7108
Error: t.f90, line 3: Arguments to intrinsic ASSOCIATED have different type/kind/rank/char-length
Error: t.f90, line 4: Arguments to intrinsic ASSOCIATED have different type/kind/rank/char-length
What you're missing is this:
TARGET (optional) shall be allowable as the data-target or proc-target in a pointer assignment statement (10.2.2) in which POINTER is data-pointer-object or proc-pointer-object.
We then go to 10.2.2 which says (emphasis mine):
C1019 (R1033) If bounds-remapping-list is not specified, the ranks of data-pointer-object and data-target shall be the same.
So... not valid Fortran 2018.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought I saw an ICE reported in amongst these college pranks!
I filed CMPLRLLVM-39206.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> It is ranked 12 in the world.
In rolling trolleys into a river?
Your students will have to buck up a bit.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for quizzing and "testing" the Fortran standard, this ultimately makes the language stronger
As to the side discussion "Lol ANU is not a college", I think maybe this is down to perceived meaning of college. Is ANU Australian National University? If so that would fall into my (and several dictionaries) definition of a college including the ANU wiki entry which says "Its main campus encompasses seven teaching and research colleges....". Anyway I learned something. Additionally pretty much every higher education establishment on the planet claims some ranking in some list or other to be in the Top N for something generally where N < 20.
To quote wiki again "ANU is regarded as one of the world's leading universities, and is ranked as the number one university in Australia and the Southern Hemisphere by the 2022 QS World University Rankings[6] and second in Australia in the Times Higher Education rankings.[7] Compared to other universities in the world, it is ranked 27th by the 2022 QS World University Rankings,[6] and equal 54th by the 2022 Times Higher Education.[7]"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ICE that was reported in this thread is fixed in the 2024.2 release. That's planned to be available in mid-2024.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »