Skip to content

Commit 7ea7cf9

Browse files
committed
Use complex types defined in lfortran_intrinsics
1 parent d559090 commit 7ea7cf9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libasr/codegen/asr_to_c_cpp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,13 @@ R"(#include <stdio.h>
450450
if (gen_stdcomplex) {
451451
sub = "std::complex<float> ";
452452
} else {
453-
sub = "float complex ";
453+
sub = "float_complex_t ";
454454
}
455455
} else {
456456
if (gen_stdcomplex) {
457457
sub = "std::complex<double> ";
458458
} else {
459-
sub = "double complex ";
459+
sub = "double_complex_t ";
460460
}
461461
}
462462
}

src/libasr/codegen/c_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,13 @@ namespace CUtils {
314314
case ASR::ttypeType::Complex: {
315315
if( kind == 4 ) {
316316
if( is_c ) {
317-
type_src = "float complex";
317+
type_src = "float_complex_t";
318318
} else {
319319
type_src = "std::complex<float>";
320320
}
321321
} else if( kind == 8 ) {
322322
if( is_c ) {
323-
type_src = "double complex";
323+
type_src = "double_complex_t";
324324
} else {
325325
type_src = "std::complex<double>";
326326
}

0 commit comments

Comments
 (0)