- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
When using ifx together with -check all, I get runtime errors of the type "A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target" that I believe to be incorrect. I can reproduce the behaviour with the example below:
program test
type typ
real, contiguous, pointer :: p(:) => null()
end type
type (typ) :: a
real, contiguous, pointer :: b(:)
!a%p => null()
b => a%p
end program
Compiling and runnig this with
ifx -check all ifx_contiguous.F90
./a.out
Results in:
forrtl: severe (408): fort: (32): A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target.
Image PC Routine Line Source
a.out 000000000048B71E Unknown Unknown Unknown
a.out 000000000040B589 Unknown Unknown Unknown
libc-2.31.so 00007F7BD0F01083 __libc_start_main Unknown Unknown
a.out 000000000040B45E Unknown Unknown Unknown
If I uncomment line 7 that explicitly nullifies a%p, the program runs without issue. This could suggest that the initialization of type member p is not happening correctly.
Other compilers (classic ifort, gfortran, aocc, nvfortran) do not have any problem with the above example.
Jorn
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to validate that this reproducer is running correctly? Add a print statement maybe.
It's the -check contiguous that is causing the failure. That's imbedded in the -check all.
As a workaround compile like this: ifx -what -check all,nocontiguous jorn.f90
It completes successfully, but there's output to confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our production code passes all test suites if I omit -check all altogether, or use -check all,nocontiguous,nouninit (uninit seems to have issues of its own). Thus, it looks it is the runtime check itself that is the problem. The reduced example is so simple that there is little we can confirm, except that the association status of b should be .false. at the end. For instance, with print *, associated(b). Though I'll note for that, "nouninit" is crucial as any use of "print" otherwise triggers a MemorySanitizer warning (completely unrelated to the above example - it occurs already with a program that just prints a string...)
In other words, we can work around the issue, but I do hope that this issue can be fixed in a future release, as adding -check all is generally the first thing we (and our users) do when we start debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a known issue using -check uninit. See Ron's post. That should be fixed in ifx 2024.1.0 which is planned to be available by next week.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug report, CMPLRLLVM-57241. We'll let you know when it's fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue was fixed, and the fix will be available in the 2025.0 Intel Fortran Compiler release.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page