summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-12 14:44:45 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-12 14:51:50 -0400
commit02b70c0cb1203a9a3cc9a0bda0f013188a2a4942 (patch)
tree3ef1f67f131987a60dd58f7efdfb4732710cabcd
parent1f4ff634187a9127ab160b2651c9decd80e82435 (diff)
downloadroux-02b70c0cb1203a9a3cc9a0bda0f013188a2a4942.tar.gz
bug in checking of multiple definitions
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 6daa590..5edffa1 100644
--- a/parse.c
+++ b/parse.c
@@ -530,13 +530,13 @@ parseline(PState ps)
 		break;
 	case TLbl:
 		b = findblk(tokval.str);
-		if (b->jmp.type != JXXX)
-			err("multiple definitions of block");
 		if (curb && curb->jmp.type == JXXX) {
 			closeblk();
 			curb->jmp.type = JJmp;
 			curb->s1 = b;
 		}
+		if (b->jmp.type != JXXX)
+			err("multiple definitions of block @%s", b->name);
 		*blink = b;
 		curb = b;
 		plink = &curb->phi;