#3188 closed defect (fixed)
Array indexing generates bad code
Reported by: | Adrian Pop | Owned by: | Mahder Alemseged Gebremedhin |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: | Mahder Alemseged Gebremedhin |
Description
We generate bad code for this model:
function f input Real t; output Boolean arr[4]; algorithm arr[{1, 2}] := {true, false}; arr[{3, 4}] := {false, true}; end f; model ArrayIndexing Boolean gates[4](each start = false); equation gates = f(time); end ArrayIndexing;
Change History (4)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:3 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:4 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Note:
See TracTickets
for help on using tickets.
Fixed in r24930. Test cases added in r24947.