10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-22 20:33:39 +01:00

Fix toucher 3.

This commit is contained in:
Thomas Applencourt 2017-01-31 14:39:46 -06:00
parent bab16c1e34
commit 602fb3cf29

View File

@ -501,20 +501,8 @@ def build_needs(parsed_text, subroutines, stuple, variables):
# Needs_by # Needs_by
# ~#~#~#~#~# # ~#~#~#~#~#
# This a some dark vodou magic.
# The algo is:
# - Initialise needed_by
# - Create the pointer copy
# - Add the value (so it add also to the pointer reference...)
for v in variables:
main = variables[v].same_as
if main != v:
variables[v].needed_by = variables[main].needed_by
for v in variables: for v in variables:
var = variables[v] var = variables[v]
if var.is_main:
for x in var.needs: for x in var.needs:
variables[x].needed_by.append(var.name) variables[x].needed_by.append(var.name)