I'm running the latest ifort 2017.1 and found this unwanted behavior. It's illustrated by a short program and the result after two different compilations.
The attached code prints
$ ./test Before: 2 After: 1 ; w = 0.6000000
A simple statement: print *,a(b(1:2)) compiles without a complaint,
Command: ifort -check all -debug all -fpe0 -traceback test.f90
but the execution fails, with the message:
Hi there, the code below compiles and runs without error: