- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
1 返信
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
We found an error and started triaging it with development team.
Thanks.
