summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-10-01 12:15:35 +0200
committerClifford Wolf <clifford@clifford.at>2015-10-01 12:15:35 +0200
commite51dcc83d087d2fc91c39460b3e8c5dcc683a4da (patch)
tree27e7dea726da0042aeed851bf8e978b7f5ea4f5f /frontends
parent9caeadf79713534a1fd5f51fb458af245c34dad9 (diff)
Fixed complexity of assigning to vectors in constant functions
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/simplify.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 2e6892a8..861c3bcc 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -2828,6 +2828,9 @@ AstNode *AstNode::eval_const_function(AstNode *fcall)
if (stmt->type == AST_ASSIGN_EQ)
{
+ if (stmt->children.at(0)->type == AST_IDENTIFIER && stmt->children.at(0)->children.size() != 0 &&
+ stmt->children.at(0)->children.at(0)->type == AST_RANGE)
+ stmt->children.at(0)->children.at(0)->replace_variables(variables, fcall);
stmt->children.at(1)->replace_variables(variables, fcall);
while (stmt->simplify(true, false, false, 1, -1, false, true)) { }