- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Nesting associate statements leads to ICE's in both ifort and ifx. Here is a MWE which aborts:
associate(d => sin(42.0))
associate(g => d)
print *, g, loc(g) == loc(d)
end associate
end associate
endOutput of other compilers can be found in Compiler Explorer: https://godbolt.org/z/TE7z37vne
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
It looks like this has been resolved with version 2025.3.0.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
It was a bug in ifx 2025.2 and earlier. Fixed in 2025.3.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
With my version of ifx the ICE has gone away but the output still looks wrong because the result of loc(g) == loc(d) is F. Gfortran gives T.
```
(lf) john:~$ ifx --version
ifx (IFX) 2025.3.0 20251010
Copyright (C) 1985-2025 Intel Corporation. All rights reserved.
(lf) john:~$ ifx associate.f90 && ./a.out
-0.9165215 F
(lf) john:~$ gfortran associate.f90 && ./a.out
-0.916521549 T
(lf) john:~$
```
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
We'd have to read the standard "fine-print" here. I'm not sure the results of `loc` extension are relevant here. I used it to determine if compilers are creating copies or not. Note that you cannot use `c_loc` on `g` or `d`, because they don't have the pointer or target attribute.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
There is no standard "fine print" because the F2023 standard has no LOC intrinsic, and so gfortran and ifx must have provided it as extensions. The different outputs suggest that ASSOCIATE was implemented in different ways that both work.