[3.10] bpo-46004: Fix error location for loops with invalid targets (GH-29959). (GH-29961)

(cherry picked from commit 1c7a1c3be08ee911d347fffd2716f3911ba751f9)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index ad2864b..bc5f83a 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -234,6 +234,7 @@ def testSyntaxErrorOffset(self):
         check("ages = {'Alice'=22, 'Bob'=23}", 1, 16)
         check('match ...:\n    case {**rest, "key": value}:\n        ...', 2, 19)
         check("[a b c d e f]", 1, 2)
+        check("for x yfff:", 1, 7)
 
         # Errors thrown by compile.c
         check('class foo:return 1', 1, 11)