This example code fails to compile with the latest compiler when -check shape is specified, however from what I can tell there's nothing wrong with it.
program test integer, dimension(3) :: model, mesh integer, dimension(1, 3) :: permutation model = 0 permutation(1,:) = [1, 2, 2] mesh(:) = model(permutation(1,:)) end program test
Here's the output of the compile command:
[bjm900@gadi-login-03 bjm900]$ ifort --version ifort (IFORT) 18.104.22.168 20191121 Copyright (C) 1985-2019 Intel Corporation. All rights reserved. [bjm900@gadi-login-03 bjm900]$ ifort -check shape test.f90 test.f90(8): error #5581: Shape mismatch: The extent of dimension 1 of array MESH is 3 and the corresponding extent of array MODEL is 1 mesh(:) = model(permutation(1,:)) ------------^ compilation aborted for test.f90 (code 1)
Never mind -- one of our users reported this to me, so I reported it here after confirming. But I just found that they've also reported it here (https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/843512).
Edit: support ticket lodged