Commit cf1c1267 authored by sparonuz's avatar sparonuz
Browse files

[run_@r14986]: Removed indexing of structures of pointers that are passed to...

[run_@r14986]: Removed indexing of structures of pointers that are passed to isassociated function to avoid compiling error error #7835: Record fields or array elements or sections of pointers are not themselves pointers.
parent 6e9b35df
......@@ -147,7 +147,15 @@ def _add_argument_truncation(line, subprogram_call, counter):
for var, id_num, is_pointer in variables_to_truncate:
call_to_subroutine += "\n"
if is_pointer:
call_to_subroutine += "if(associated(%s)) then\n" % var
# Remove indexing to avoid
# error #7835: Record fields or array elements or sections of pointers are not themselves pointers.
if var.count("%"):
indexed_member = var.split("%")[-1]
member_name = Getter.remove_indexing(indexed_member)
deindexed_var = var.replace(indexed_member, member_name)
else:
deindexed_var = Getter.remove_indexing(var)
call_to_subroutine += "if(associated(%s)) then\n" % deindexed_var
call_to_subroutine += if_condition + " %s%%sbits = emulator_variable_precisions(%i) \n" % (var, id_num)
call_to_subroutine += if_condition + " CALL apply_truncation(%s)" % var
if is_pointer:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment