From 64743c98e76ebfb3586a194c6ba2e6b67202f826 Mon Sep 17 00:00:00 2001
From: Stuart Archibald <stuartarchibald@users.noreply.github.com>
Origin: https://github.com/numba/numba/pull/8639
Date: Mon, 28 Nov 2022 15:08:02 +0000
Subject: [PATCH 12/20] Fix out of bounds loop index in test.

As title.
---
 numba/tests/test_ir.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/numba/tests/test_ir.py b/numba/tests/test_ir.py
index 8704c902897..819c784694d 100644
--- a/numba/tests/test_ir.py
+++ b/numba/tests/test_ir.py
@@ -432,7 +432,7 @@ def check_diffstr(string, pointing_at=[]):
             blk = z_ir.blocks[label]
             ref = blk.body[:-1]
             idx = None
-            for i in range(len(ref)):
+            for i in range(len(ref) - 1):
                 # look for two adjacent Del
                 if (isinstance(ref[i], ir.Del) and
                         isinstance(ref[i + 1], ir.Del)):

