- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the following code is properly diagnosed by NAG but accepted without warning by ifx-2025.0:
program p
implicit none
integer, pointer :: a, a3(:,:,:)
call foo (a)
call foo (null (a))
call foo (a3)
call foo (null (a3))
call foo (null()) ! NAG: MOLD argument is missing / not detected by ifx
contains
subroutine foo(x)
integer, pointer, intent(in) :: x(..)
print *, rank(x)
end subroutine
end
NAG prints:
% nagfor ifx-null-actual.f90
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7200
Error: ifx-null-actual.f90, line 8: Argument X (no. 1) to FOO is intrinsic NULL with no MOLD argument, but X is assumed-rank
[NAG Fortran Compiler error termination, 1 error]
ifx however accepts the code:
% ifx ifx-null-actual.f90 -stand && ./a.out
0
0
3
3
1
It is funny that NULL() should have a well-defined rank ...
Thanks,
Harald
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NAG has implemented a check for interpretation F18/041, Intel has not yet. (Note who submitted this!) It was accepted as part of F2018 Corrigendum 2.
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