diff --git a/vhdlpp/vtype.cc b/vhdlpp/vtype.cc index 4dc97199a..d2f6ad6dc 100644 --- a/vhdlpp/vtype.cc +++ b/vhdlpp/vtype.cc @@ -266,12 +266,11 @@ bool VTypeArray::is_variable_length(ScopeBase*scope) const { void VTypeArray::evaluate_ranges(ScopeBase*scope) { for(std::vector::iterator it = ranges_.begin(); it != ranges_.end(); ++it ) { int64_t lsb_val = -1, msb_val = -1; - bool dir = it->is_downto(); if(it->msb()->evaluate(scope, msb_val) && it->lsb()->evaluate(scope, lsb_val)) { assert(lsb_val >= 0); assert(msb_val >= 0); - *it = range_t(new ExpInteger(msb_val), new ExpInteger(lsb_val), dir); + *it = range_t(new ExpInteger(msb_val), new ExpInteger(lsb_val), msb_val > lsb_val); } } }