Commit cb885111 authored by erodrigu's avatar erodrigu
Browse files

Changed member_name with clean_contents

parent 5c47bd56
......@@ -170,22 +170,24 @@ def insert_variable_precision_specification(variable, module, insertion_line, co
if variable.is_pointer and not variable.allocatable:
module.lines[insertion_line] += "\nend if"
def _get_member_name(arg, module, line_index, vault, variable):
# Get variable name without indexing (foo(n)%var --> foo%var)
member_name = Getter.remove_indexing(arg)
member_type = Getter.get_type_of_contents(member_name, module.blocks[line_index], vault)
clean_contents = Getter.remove_indexing(arg)
member_type = Getter.get_type_of_contents(clean_contents, module.blocks[line_index], vault)
# Get the variable
if member_name.count("%"):
var = Getter.get_structure_member(member_name, module.blocks[line_index], vault)
if clean_contents.count("%"):
var = Getter.get_structure_member(clean_contents, module.blocks[line_index], vault)
var = vault.get_variable_by_name(member_name, module.blocks[line_index])
var = vault.get_variable_by_name(clean_contents, module.blocks[line_index])
# Fix only if it's an rpe_var and it's the "same" variable
if member_type != 'rpe_var' or not variable.is_equal_to(var):
return None
return member_name
return arg.split([0] +
def insert_variable_precision_specification_to_allocatable(variable, counter_object, vault):
for module in [variable.module] + variable.procedure.module.used_by:
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