Commit 4eb270d8 authored by Stefan Behnel's avatar Stefan Behnel

fix previously introduced crash bug due to multiple temp allocation in comprehensions

parent d49e0ae5
......@@ -3189,12 +3189,14 @@ class ComprehensionNode(NewTempExprNode):
self.type = self.target.type
self.append.target = self # this is a CloneNode used in the PyList_Append in the inner loop
self.loop.analyse_declarations(env)
self.loop.analyse_expressions(env)
def allocate_temps(self, env, result = None):
if debug_temp_alloc:
print("%s Allocating temps" % self)
self.allocate_temp(env, result)
# call loop.analyse_expressions() now to make sure temps get
# allocated at the right time
self.loop.analyse_expressions(env)
def calculate_result_code(self):
return self.target.result()
......
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