Skip to content

Commit

Permalink
- handle size({}, dim) as zero in Compiler/Template/CodegenC.tpl
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23494 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 20, 2014
1 parent cbc63db commit fcfdb09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Compiler/Template/CodegenC.tpl
Expand Up @@ -9617,6 +9617,11 @@ template daeExpSize(Exp exp, Context context, Text &preExp,
let resVar = tempDecl("integer_array", &varDecls)
let &preExp += 'sizes_of_dimensions_base_array(&<%expPart%>, &<%resVar%>);<%\n%>'
resVar
/* array of zero? */
case SIZE(exp=ARRAY(array = {})) then
let resVar = tempDecl("modelica_integer", &varDecls)
let &preExp += '<%resVar%> = 0;<%\n%>'
resVar
else error(sourceInfo(), printExpStr(exp) + " not implemented")
end daeExpSize;

Expand Down

0 comments on commit fcfdb09

Please sign in to comment.