Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix iterator order for -d=vectorizeBindings (#10799)
Fixes #10794
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
testsuite/flattening/modelica/scodeinst/VectorizeBindings1.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// name: VectorizeBindings1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst,-nfScalarize,vectorizeBindings | ||
// | ||
|
||
model M | ||
parameter Real p = 1; | ||
parameter Real q = 2; | ||
end M; | ||
|
||
model VectorizeBindings1 | ||
parameter Real p = 2; | ||
M m[2,3](each p = 2*p); | ||
end VectorizeBindings1; | ||
|
||
// Result: | ||
// class VectorizeBindings1 | ||
// parameter Real p = 2.0; | ||
// parameter Real[2, 3] m.q = fill(2.0, 2, 3); | ||
// parameter Real[2, 3] m.p = array(array(2.0 * p for $m2 in 1:3) for $m1 in 1:2); | ||
// end VectorizeBindings1; | ||
// endResult |