title: Fortran: Array pointer to different arrays
body: <p>Is it possible to have a <em>pointer array to multiple targets</em>?</p>
  <p>Basically I want the following code to work</p>
  <pre class="lang-fortran prettyprint-override"><code>program main
  
    implicit none
  
    integer, target  :: a(2), b(3)
    integer, pointer :: ptr(:)
  
    a = [1, 2]
    b = [3, 4, 5]
  
    ptr =&gt; [a, b]     ! ERROR
  
    print *, ptr      ! should be 1,2,3,4,5
  
  end program
  </code></pre>
  <p>Is it not possible as the targets might not be in in <strong>contiguous</strong> memory?</p>