﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2214	code generation for iteration variable	Lennart Ochel	Per Östlund	"I found some issues using blocks. OpenModelica cannot simulate the model test from the following package.

{{{
package bug_2213
  block anyChange ""does any entry of a boolean vector change its value?""
    input Boolean vec[:];
    output Boolean anychange;
  algorithm
    anychange:=false;
    for i in 1:size(vec, 1) loop
      anychange:=anychange or change(vec[i]);
    end for;
  end anyChange;

  model test
    Boolean b[3];
    anyChange ac(vec=b);
    Integer i(start=0, fixed=true);
  equation
    b[1] = time > 0.1;
    b[2] = time > 0.2;
    b[3] = time > 0.3;

    when ac.anychange then
      i = pre(i) + 1;
    end when;
  end test;
end bug_2213;
}}}

(see also #2213)

The issue is that we get in conflict with the variable name i in the generated c-code."	defect	closed	high	1.19.0	Code Generation	trunk	fixed		Lennart Ochel Willi Braun
