Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r12-7694-g2b3404357a1f99.

gcc/analyzer/ChangeLog:
        * program-point.cc (program_point::get_next): Fix missing
        increment of index.

Signed-off-by: David Malcolm <dmalc...@redhat.com>
---
 gcc/analyzer/program-point.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/analyzer/program-point.cc b/gcc/analyzer/program-point.cc
index 5318dce1490..9e264b14735 100644
--- a/gcc/analyzer/program-point.cc
+++ b/gcc/analyzer/program-point.cc
@@ -645,7 +645,7 @@ program_point::get_next () const
        return after_supernode (get_supernode (), get_call_string ());
     case PK_BEFORE_STMT:
       {
-       unsigned next_idx = get_stmt_idx ();
+       unsigned next_idx = get_stmt_idx () + 1;
        if (next_idx < get_supernode ()->m_stmts.length ())
          return before_stmt (get_supernode (), next_idx, get_call_string ());
        else
-- 
2.26.3

Reply via email to