On a lot of machine, when callying Apply_ASR, the fortran code fails with a segmentation fault. This behaviour seems quite random but on many machines it happens consistently. It is possible that it occurs when the code is compiled with intel, or a specific version of gcc.
Anyway, this behaviour is clearly indicating that a memory related bug in the subroutine is occurring (maybe some compilers automatically fix it at compile time).
The problem is that it is difficult to reproduce, however, I believe it is quite urgent to have a look to that subroutine.