Skip to content

Commit 0d78f16

Browse files
[C] Fix the allocatable array size
1 parent 17213e4 commit 0d78f16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libasr/codegen/asr_to_c_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2615,7 +2615,7 @@ PyMODINIT_FUNC PyInit_lpython_module_)" + fn_name + R"((void) {
26152615
} else {
26162616
l = "1";
26172617
}
2618-
size_str += "*" + l;
2618+
size_str += "*" + sym + "->dims[" + std::to_string(j) + "].length";
26192619
out += indent + sym + "->dims[" + std::to_string(j) + "].lower_bound = ";
26202620
out += st + ";\n";
26212621
out += indent + sym + "->dims[" + std::to_string(j) + "].length = ";

0 commit comments

Comments
 (0)