Skip to content

Use of uninitialized value #13

Description

@jamesjer

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
      |                                 ^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions