Commit 8af9ce41 authored by Stefan Behnel's avatar Stefan Behnel

fix compiler crash when trying to optimise non-implemented old-style integer division

parent 99d47bff
......@@ -2891,6 +2891,9 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin,
if is_float:
if operator not in ('Add', 'Subtract', 'TrueDivide', 'Divide'):
return node
elif operator == 'Divide':
# mixed old-/new-style division is not currently optimised for integers
return node
elif abs(numval.constant_result) > 2**30:
return node
......
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