https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124258

            Bug ID: 124258
           Summary: gcc/fortran/decl.cc:4970: Pointless test ?
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Static analyser cppcheck says:

gcc/fortran/decl.cc:4970:21: style: Expression is always true because 'else if'
condition is opposite to previous condition at line 4946. [multiCondition]

Source code is

  if (ts->kind != -1) 
    {
       ...
    }
  else if (ts->kind == -1)

Suggest remove pointless test.

Reply via email to