Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
27429 Discussions

Bogus run-time error with "-check all": A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target

Janus
New Contributor I
180 Views

Dear Intel team,

I have recently tried the beta release of ifort 18 for Linux, and found one problem (which seems to be a regression wrt ifort 17). Please consider this short test case:

program fpm

   implicit none

   type t
      integer, dimension(:), contiguous , pointer :: list
   end type

   integer, dimension(:), contiguous, pointer :: l
   type(t), pointer :: n

   open(unit=99, file='xxx.dat')
   close (unit=99)

   allocate(n)

   n%list => null()

   l => n%list
end

Compiling this with "ifort -check all" (using version 18 beta) works fine, but when executing the generated binary, I see the following error:

forrtl: severe (408): fort: (32): A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target.

This is obviously not very helpful. It should be legal to assign a contiguous pointer to NULL. There is no error with ifort 17. Interestingly the error goes away when removing the file operations (open/close), which are completely unrelated to the pointer assignments. I hope this can be fixed for the final release of ifort 18 (I opened support request #03029761 for it).

Best regards,

Janus Weil

 

0 Kudos
1 Reply
Devorah_H_Intel
Moderator
180 Views

This issue was reported via Online Service Center and escalated to the engineering team. 

Reply