Skip to content

Commit

Permalink
Derivatives in delay expressions were translated into wrong C referen…
Browse files Browse the repository at this point in the history
…ce. Fixed.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16660 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
smiz committed Jul 23, 2013
1 parent 0a16d9f commit 764d7b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenAdevs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ template expCref(DAE.Exp ecr)
match ecr
case CREF(__) then cref(componentRef)
case CALL(path = IDENT(name = "der"), expLst = {arg as CREF(__)}) then
'$P$DER<%cref(arg.componentRef)%>'
'_DER<%cref(arg.componentRef)%>'
else "ERROR_NOT_A_CREF"
end expCref;

Expand Down Expand Up @@ -4301,7 +4301,7 @@ template daeExpCall(Exp call, Context context, Text &preExp /*BUFP*/,
'<%var%>'

case CALL(path=IDENT(name="der"), expLst={arg as CREF(__)}) then
'$P$DER<%cref(arg.componentRef)%>'
'_DER<%cref(arg.componentRef)%>'
case CALL(path=IDENT(name="der"), expLst={exp}) then
error(sourceInfo(), 'Code generation does not support der(<%printExpStr(exp)%>)')
case CALL(path=IDENT(name="pre"), expLst={arg}) then
Expand Down

0 comments on commit 764d7b9

Please sign in to comment.