/*
 * Regression test for bad hoisting of subexpression out of loop
 */

// SKIP-O2-TEST
// SKIP-O3-TEST

int x;

foreach i in [1:100] {
  // Optimiser hoists y declaration but not calculation
  int y = x * x;
  trace(y);
}


(int o) id (int i) "turbine" "0.0" [
    "set <<o>> <<i>>"
];

// Hide value from optimiser
x = id(1);

Add regression test for hoisting bug
Add regression test for hoisting bug

git-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@15143 dc4e9af1-7f46-4ead-bba6-71afc04862de
