aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr51074.c
blob: d6c8cea1f842e08436a3d04af513307d3e980d27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* PR tree-optimization/51074 */

#include "tree-vect.h"

struct S { int a, b; } s[8];

int
main ()
{
  int i;
  check_vect ();
  for (i = 0; i < 8; i++)
    {
      s[i].b = 0;
      s[i].a = i;
    }
  asm volatile ("" : : : "memory");
#pragma GCC novector
  for (i = 0; i < 8; i++)
    if (s[i].b != 0 || s[i].a != i)
      abort ();
  return 0;
}