I have been wasting time for hours trying to understand why my code does not work, the way it should as the Fortran standard says. and finally I realized Intel Fortran compiler does not provide automatic reallocation by default, as it was introduced in Fortran 2003 Standard. According to this page:
one has to use the compilation flag /assume:realloc_lhs to get the "default" behavior as one should in modern Fortran. Why is there so much drag to follow the new Fortran standards? It is now a decade and half since this feature was introduced and yet one has to explicitly request the compiler to recognize the new Fortran stanard. Thanks for any reasonable explanation, and permanent fix to this problem, if there is any.
I am using: Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 220.127.116.11 Build 20140726
Copyright (C) 1985-2014 Intel Corporation. All rights reserved.