- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that the behavior of the code shown below is incorrect.
Omitting the coindex for I is a syntactic shortcut for I[THIS_IMAGE()] and should be valid: The fortran standard says "Except in contexts where coindexed objects are disallowed, accessing a coarray on its own image by using a set of cosubscripts that specify that image has the same effect as accessing it without cosubscripts."
The code was compiled with IFX2025.1.0.
There may be other procedures impacted by this bug.
PROGRAM P
USE ISO_FORTRAN_ENV, ONLY : ATOMIC_INT_KIND
IMPLICIT NONE
INTEGER(KIND = ATOMIC_INT_KIND) :: I[*]
INTEGER :: STAT, VAL
STAT = -1
IF (THIS_IMAGE() == 1 ) THEN
CALL ATOMIC_DEFINE(I, 100, STAT = STAT)
WRITE(*, *) THIS_IMAGE(), I, STAT ! STAT should be 0 here...
CALL ATOMIC_DEFINE(I[1], 100, STAT = STAT)
WRITE(*, *) THIS_IMAGE(), I, STAT ! STAT is 0, as expected...
END IF
END PROGRAM P
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We found an error and started triaging it with development team.
Thanks.

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