Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

F08 warning when using a 1D pointer for a 2D array (bound remapping)

$
0
0

Hi all,

this code:

Program Test
  integer, pointer, contiguous :: a(:,:),b(:)
  b(1:size(a))=>a
end Program Test

compiles with a warning when the standard 08 checking flag is up.

warning #8589: Fortran 2008 specifies that if a bound remapping list is specified, data target must be of rank one.   [A]
  b(1:size(a))=>a

Looking up the message on google yielded that there was once a discussion about similar issue https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/475663

Is this a standard violation and do I have to change the code, or is it just a bug??

In the application "a" is a large array and must be vectorized for some matrix multiplication. Using the pointer I try to avoid copying data via "reshape".

 

Thanks

 


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>