Fortran if(present(VAR).and.VAR) not allowed
It appears that you cannot use: if(present(VAR).and.VAR)
This is not safe as the compiler is allowed to evaluate the VAR argument before the present function is evaluated. If the VAR argument is not present, an out of bounds memory reference could occur, which could cause a failure.
Edited by Ned Thaddeus Taylor