Commit a6b0a201 authored by Stefan Behnel's avatar Stefan Behnel

fix compiler crash

parent f21c0e97
...@@ -3394,6 +3394,9 @@ class ConstantFolding(Visitor.VisitorTransform, SkipDeclarations): ...@@ -3394,6 +3394,9 @@ class ConstantFolding(Visitor.VisitorTransform, SkipDeclarations):
def visit_ExprStatNode(self, node): def visit_ExprStatNode(self, node):
self.visitchildren(node) self.visitchildren(node)
if not isinstance(node.expr, ExprNodes.ExprNode):
# ParallelRangeTransform does this ...
return node
# drop unused constant expressions # drop unused constant expressions
if node.expr.has_constant_result(): if node.expr.has_constant_result():
return None return None
......
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