Skip to content

Commit a1d1ddc

Browse files
committed
Fix compilation errors when ARCH=riscv
When ARCH=riscv, the following compilation errors occur: In file included from src/main.c:41: src/codegen.c: In function ‘cfg_flatten’: src/codegen.c:111:9: error: ‘flatten_ir’ undeclared (first use in this function); did you mean ‘fflatten_ir’? 111 | flatten_ir->src0 = fn->func->stack_size; | ^~~~~~~~~~ | fflatten_ir src/codegen.c:111:9: note: each undeclared identifier is reported only once for each function it appears in src/codegen.c:110:19: warning: unused variable ‘fflatten_ir’ [-Wunused-variable] 110 | ph2_ir_t *fflatten_ir = add_ph2_ir(OP_define); | ^~~~~~~~~~~ Fix the erroneous variable name 'fflatten_ir' to 'flatten_ir' to avoid compilation errors. Fixes: 7f328f3 ("Apply editorial changes")
1 parent d4dcc6e commit a1d1ddc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/riscv-codegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void cfg_flatten()
107107

108108
for (fn_t *fn = FUNC_LIST.head; fn; fn = fn->next) {
109109
/* reserve stack */
110-
ph2_ir_t *fflatten_ir = add_ph2_ir(OP_define);
110+
ph2_ir_t *flatten_ir = add_ph2_ir(OP_define);
111111
flatten_ir->src0 = fn->func->stack_size;
112112

113113
for (basic_block_t *bb = fn->bbs; bb; bb = bb->rpo_next) {

0 commit comments

Comments
 (0)