We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f83e92 commit 1b33f60Copy full SHA for 1b33f60
src/libasr/codegen/asr_to_c.cpp
@@ -590,16 +590,9 @@ R"(
590
591
void visit_ComplexConstant(const ASR::ComplexConstant_t &x) {
592
headers.insert("complex");
593
-
594
- ASR::Complex_t *t = ASR::down_cast<ASR::Complex_t>(x.m_type);
595
596
std::string re = std::to_string(x.m_re);
597
std::string im = std::to_string(x.m_im);
598
599
- std::string type_name = "float complex";
600
- if (t->m_kind == 8) type_name = "double complex";
601
602
- src = "(" + type_name + ") (" + re + ", " + im + ")";
+ src = "CMPLX(" + re + ", " + im + ")";
603
604
last_expr_precedence = 2;
605
}
0 commit comments