view gcc/testsuite/gcc.dg/torture/pr53516.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-options "-ftree-vectorize -ftree-loop-distribute-patterns" } */

extern void abort (void);

struct Foo
{
  char a : 1;
  char b : 7;
};

struct Foo x[256];
int y[256];

void __attribute__((noinline,noclone)) bar (int n)
{
  int i;
  for (i = 0; i < n; ++i)
    {
      x[i].a = 0;
      y[i] = 3;
    }
}

int main()
{
  x[5].b = 7;
  bar (256);
  if (x[5].b != 7)
    abort ();
  return 0;
}