Hello, I believe this one-line patch fixes [999042] "Compiler module doesn't handle global statement correctly" bug. Without setting the 'optimized' flag compiler.pycodegen.CodeGenerator._nameOp always emits STORE_NAME and not STORE_GLOBAL opcode. After applying test_compiler passes fine.
This patch is wrong. STORE_GLOBAL ought to be used even if optimization is turned off; faking it to be True may have undesirable side effects. The builtin compiler solves this problem by putting the GLOBAL_EXPLICIT scope to a name. The compiler package should do the same. Rejecting this patch.