Skip to content

Commit 6767b2b

Browse files
committed
Fix CTEST failure: declare '-' at print_i32() end
1 parent 08617ae commit 6767b2b

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

src/libasr/codegen/asr_to_x86.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ class ASRToX86Visitor : public ASR::BaseVisitor<ASRToX86Visitor>
141141
for (auto &s : m_global_strings) {
142142
emit_data_string(m_a, s.first, s.second);
143143
}
144-
emit_data_string(m_a, "string-", "-"); // - symbol for printing negative ints
145144

146145
}
147146

src/libasr/codegen/wasm_to_x86.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ class X86Visitor : public WASMDecoder<X86Visitor>,
351351
std::string label = "string" + std::to_string(s.first);
352352
emit_data_string(m_a, label, s.second);
353353
}
354-
emit_data_string(m_a, "string-", "-"); // - symbol for printing negative ints
355354

356355
emit_elf32_footer(m_a);
357356
}

src/libasr/codegen/x86_assembler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ void emit_print_int(X86Assembler &a, const std::string &name)
198198
a.asm_mov_r32_r32(X86Reg::esp, X86Reg::ebp);
199199
a.asm_pop_r32(X86Reg::ebp);
200200
a.asm_ret();
201+
202+
emit_data_string(a, "string-", "-"); // - symbol for printing negative ints
201203
}
202204

203205
} // namespace LFortran

0 commit comments

Comments
 (0)