From 9bf3b15c084028d6538ae16b83f4b7c898825b77 Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Sat, 27 Dec 2014 10:33:58 +0100
Subject: [PATCH] do not depend on reversed(range()) bounds having a numeric
 type and just use whatever spanning type we find

---
 Cython/Compiler/Optimize.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py
index fffacf8f5..bc459d17c 100644
--- a/Cython/Compiler/Optimize.py
+++ b/Cython/Compiler/Optimize.py
@@ -669,7 +669,7 @@ class IterationTransform(Visitor.EnvTransform):
                     bound1_value = step_value * ((begin_value - end_value - 1) // step_value) + end_value + 1
                     bound1 = ExprNodes.IntNode(
                         bound1.pos, value=str(bound1_value), constant_result=bound1_value,
-                        type=PyrexTypes.widest_numeric_type(bound1.type, bound2.type))
+                        type=PyrexTypes.spanning_type(bound1.type, bound2.type))
                 else:
                     # FIXME: Optimize when variable is in range (e.g. reversed(range(x, y, 3)))
                     return node
-- 
2.30.9