test for 2 arg exec case
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 5f91d0d..ca396a9 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -102,6 +102,11 @@
     def f():
         if True:
             exec("", {}, {})
+        """, """
+def g():
+    def f():
+        if True:
+            exec("", {})
         """]
         for c in code:
             compile(c, "<code>", "exec")