Skip to content

Commit 02d47e2

Browse files
committed
fix inline register reuse bug
1 parent 1ef00b5 commit 02d47e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backends/asm/outasm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,10 @@ void ReplaceIRWithInline(IRList *irl, IR *origir, Function *func)
666666
IR *ir;
667667
IRCond cond = origir->cond;
668668
Operand *condlbl = NULL;
669-
static char *prefix = "_inline_";
669+
670+
static unsigned inlineNum = 0;
671+
char prefix[64];
672+
snprintf(prefix,64-1,"_inline%d_",++inlineNum);
670673

671674
DeleteIR(irl, origir);
672675
if (cond != COND_TRUE) {

0 commit comments

Comments
 (0)