Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 5e47a15

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Flatten for-loop ranges when unrolling.
Belonging to [master]: - #2876
1 parent 158a345 commit 5e47a15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Compiler/NFFrontEnd/NFFlatten.mo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@ algorithm
10871087
Equation.FOR(iterator = iter, range = SOME(range), body = body) := forLoop;
10881088

10891089
// Unroll the loop by replacing the iterator with each of its values in the for loop body.
1090+
range := flattenExp(range, prefix);
10901091
range := Ceval.evalExp(range, Ceval.EvalTarget.RANGE(Equation.info(forLoop)));
10911092
range_iter := RangeIterator.fromExp(range);
10921093

0 commit comments

Comments
 (0)