As noted in #12, lu8mod consults a variable named jrep on line 759 while deciding if a matrix is singular. There is no parameter or variable named jrep in lu8mod, so an uninitialized value is used. The upshot is that, if execution reaches line 759, the decision as to whether the matrix is singular or not is made arbitrarily, independent of whether the matrix really is singular or not. If building with -Wall, this warning is produced:
src/lusol8b.f:761:21: warning: 'jrep' may be used uninitialized [-Wmaybe-uninitialized]
761 | if (.not. singlr) then
| ^
src/lusol8b.f:759:33: note: 'jrep' was declared here
759 | singlr = j1 .ne. jrep
| ^
As noted in #12, lu8mod consults a variable named jrep on line 759 while deciding if a matrix is singular. There is no parameter or variable named jrep in lu8mod, so an uninitialized value is used. The upshot is that, if execution reaches line 759, the decision as to whether the matrix is singular or not is made arbitrarily, independent of whether the matrix really is singular or not. If building with
-Wall, this warning is produced: