About the is_gimple_min_invariant predicate

Andrew Pinski pinskia@gmail.com
Thu Jul 5 09:18:00 GMT 2007


On 7/5/07, Richard Guenther <richard.guenther@gmail.com> wrote:
> The same reason why we have operands 3 and 4 for ARRAY_REFs.  Ada (I believe
> it's only ada right now) has types that have their offsets computed at
> compile-time, so
> we put gimplified values of this stuff there if it doesn't match what
> we can trivially
> compute from the type.

GNU C has it too:

int f(int n)
{
  struct s
  {
    struct {
      int i[n];
    } i[n];
    int i1[n];
  } s1;
  int i, j;
  for(i = 0;i<n;i++)
     for(j=0;j<n;j++)
       s1.i[i].i[j] = i+j;
  for(i = 0;i<n;i++)
    s1.i1[i] = i*2;
  return s1.i[n/2].i[n/2] + s1.i[n/2];
}



More information about the Gcc mailing list