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

Commit 01a2928

Browse files
rfrankeOpenModelica-Hudson
authored andcommitted
Use crefToExp when creating backend DAE with arrays
Belonging to [master]: - #2743 - OpenModelica/OpenModelica-testsuite#1063
1 parent 76f3ceb commit 01a2928

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,8 +1302,14 @@ algorithm
13021302

13031303
case DAE.EQUEQUATION(cr1 = cr1, cr2 = cr2,source = source)
13041304
equation
1305-
e1 = Expression.crefExp(cr1);
1306-
e2 = Expression.crefExp(cr2);
1305+
if Flags.isSet(Flags.NF_SCALARIZE) then
1306+
e1 = Expression.crefExp(cr1);
1307+
e2 = Expression.crefExp(cr2);
1308+
else
1309+
// consider array dimensions
1310+
e1 = Expression.crefToExp(cr1);
1311+
e2 = Expression.crefToExp(cr2);
1312+
end if;
13071313
eqns = lowerExtendedRecordEqn(e1,e2,source,BackendDAE.EQ_ATTR_DEFAULT_DYNAMIC,functionTree,inEquations);
13081314
then
13091315
(eqns,inREquations,inIEquations);

0 commit comments

Comments
 (0)