summaryrefslogtreecommitdiffstatshomepage
path: root/py/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c
index 0386b956aa..34e4f41ce1 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -3425,7 +3425,10 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind
}
uint lab = comp_next_label(comp);
if (pass > MP_PASS_SCOPE) {
- EMIT_INLINE_ASM_ARG(label, lab, MP_PARSE_NODE_LEAF_ARG(pn_arg[0]));
+ if (!EMIT_INLINE_ASM_ARG(label, lab, MP_PARSE_NODE_LEAF_ARG(pn_arg[0]))) {
+ compile_syntax_error(comp, nodes[i], "label redefined");
+ return;
+ }
}
} else if (op == MP_QSTR_align) {
if (!(n_args == 1 && MP_PARSE_NODE_IS_SMALL_INT(pn_arg[0]))) {