Opened 14 years ago
Last modified 14 years ago
#1437 closed defect (fixed)
Code generation for reductions is wrong
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Martin Sjölund, |
Description
{{{function f
input Integer i1;
output Integer i := max(j for j in {1,2,3,i1});
end f;}}}
Generates the following code, which does not work because it casts things to real that are integer. And it uses max(A,B), which is not defined (use std::max or even better, defined openmodelica_max):
{{{ modelica_integer tmp3;
...
tmp3 = max((modelica_real)(tmp3), (modelica_real)((modelica_integer)_j));}}}
Note:
See TracTickets
for help on using tickets.
Fixed with the new codegen for reductions