Skip to content

Commit

Permalink
- Bugfix codegen for unary minus of array
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13819 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 7, 2012
1 parent ccf10b8 commit 8be162c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenC.tpl
Expand Up @@ -6444,7 +6444,7 @@ case UNARY(__) then
case UMINUS_ARR(ty=T_ARRAY(ty=T_REAL(__))) then
let var = tempDecl("real_array", &varDecls)
let &preExp += 'usub_alloc_real_array(&<%e%>,&<%var%>);<%\n%>'
'<%e%>'
'<%var%>'
case UMINUS_ARR(__) then error(sourceInfo(),"unary minus for non-real arrays not implemented")
else error(sourceInfo(),"daeExpUnary:ERR")
end daeExpUnary;
Expand Down
6 changes: 5 additions & 1 deletion Compiler/Template/SimCodeDump.tpl
Expand Up @@ -61,7 +61,11 @@ template dumpEqs(list<SimEqSystem> eqs)
eq: <%crefStr(e.cref)%> = <%printExpStr(e.exp)%>;
<%dumpElementSource(e.source)%><%\n%>
>>
case e as SES_ARRAY_CALL_ASSIGN(__) then "SES_ARRAY_CALL_ASSIGN"
case e as SES_ARRAY_CALL_ASSIGN(__) then
<<
array assign: <%crefStr(e.componentRef)%> = <%printExpStr(e.exp)%>;
<%dumpElementSource(e.source)%><%\n%>
>>
case e as SES_ALGORITHM(statements={}) then 'empty algorithm<%\n%>'
case e as SES_ALGORITHM(__)
then (e.statements |> stmt =>
Expand Down

0 comments on commit 8be162c

Please sign in to comment.