record/array codegen error
The following model produces codegen error:
model foo
goo[3] x;
record goo
Real r;
end goo;
algorithm
for i in 1:3 loop
x[i].r := i;
end for;
end foo;
/*
equation index: 1
type: ALGORITHM
for i in 1:3 loop
x[i].r := (*Real*)(i);
end for;
*/
void foo_eqFunction_1(DATA *data)
{
const int equationIndexes[2] = {1,1};
TRACE_PUSH
modelica_integer tmp0;
modelica_integer tmp1;
modelica_integer tmp2;
tmp0 = (modelica_integer) 1; tmp1 = 1; tmp2 = (modelica_integer) 3;
if(!tmp1)
{
FILE_INFO info = omc_dummyFileInfo;
omc_assert(threadData, info, "assertion range step != 0 failed");
}
else if(!(((tmp1 > 0) && (tmp0 > tmp2)) || ((tmp1 < 0) && (tmp0 < tmp2))))
{
modelica_integer $Pi;
for($Pi = (modelica_integer) 1; in_range_integer($Pi, tmp0, tmp2); $Pi += tmp1)
{
$Px$lB(modelica_integer)$Pi$rB$Pr = ((modelica_real)(modelica_integer)$Pi);
}
}
TRACE_POP
}
This line is not valid:
$Px$lB(modelica_integer)$Pi$rB$Pr = ((modelica_real)(modelica_integer)$Pi);
Change History
(6)
Resolution: |
→ duplicate
|
Status: |
new → closed
|
Resolution: |
duplicate
|
Status: |
closed → reopened
|
Owner: |
changed from Lennart Ochel to Mahder Alemseged Gebremedhin
|
Status: |
reopened → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Milestone: |
Future → pre1.9.4
|
Milestone: |
pre1.9.4 → 1.9.4
|
see #2756