import math;
import sys;

// COMPILE-ONLY-TEST
// Regression test for substituting uninit var

main {
  float A[];
  // Forward reference to array values causes uninit value to be substituted
  float sum = A[1] + A[2] + A[3] + A[4] + A[4] + A[5] + A[6] + A[7] + A[8];

  // Loop should be expanded by opt
  foreach i in [1:8] {
    // Use argc so that this can't be constant folded
    A[i] = exp(itof(argc() + i));
  }

  trace(sum);
}

Add regression test for optimizer bug
Add regression test for optimizer bug

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