:78 Function create_function() is deprecated [8192]

Fix another instance of the optional argument bug that wasn't caught before.

Bruno Mundim [2017-01-23 17:03:41]
Fix another instance of the optional argument bug that wasn't caught before.
Filename
src/ext/lclist.f90
diff --git a/src/ext/lclist.f90 b/src/ext/lclist.f90
index 0d21b55..66af7c6 100644
--- a/src/ext/lclist.f90
+++ b/src/ext/lclist.f90
@@ -650,7 +650,12 @@ contains

     do inb = 1, nnb2
        iat = nblist_loc(inb)
-       if ( present(itype) .and. (atomType(iat) /= itype)) cycle
+       ! BCM: Fortran is not C! Compiler is free to evaluate statements in any
+       ! order.
+       if ( present(itype) ) then
+          if ((atomType(iat) /= itype)) cycle
+       end if
+       ! BCM: done
        ! in home unit cell:
        coo2(1:3) = matmul(latticeVec, cooLatt(1:3,iat))
        cart(1:3) = coo2(1:3) - coo1(1:3)
ViewGit