summaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-03-03 17:08:02 +0000
committerDamien George <damien.p.george@gmail.com>2015-03-03 17:08:02 +0000
commit9c5cabb502b59e5cc4354c8ca66be3d4a3e03bf9 (patch)
treecd2107a3542db6f299b56f5d6bb4725ac1dba061 /py/compile.c
parent086a7616ddd1736e064aab70bf5126bf24988a45 (diff)
py: Give error for duplicate label in inline assembler.
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 0386b956a..34e4f41ce 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]))) {