On 7/18/2025 11:43 PM, Yuao Ma wrote:
I noticed that hex(16128084538487209988) evaluates to 0xdfd2777000000004, and it looks like the higher bits weren't being zeroed out as expected. After I explicitly added pos = convert(gfc_charlen_type_node, pos); for type conversion, the test case started working perfectly.
I'm sorry, but just adding a cast doesn't solve the issue. Even if we change the pointer type, we may not be able to alter the memory layout of the input parameter. Therefore, when accessing the value with a wide type pointer, we still may not obtain the desired result......
Not sure how to handle this in/out parameter in this case. Maybe the string_split function in libgfortran should be aware of the integer kind?
Yuao