(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
vec-may_alias.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -w -Wno-abi" } */
       3  
       4  typedef int v2si __attribute__ ((vector_size (8)));
       5  typedef short v4hi __attribute__ ((vector_size (8)));
       6  typedef short v4hia __attribute__ ((vector_size (8), may_alias));
       7  
       8  __attribute__ ((noinline, noclone))
       9  int f (v2si A, int N)
      10  { return ((v4hia)A)[N]; }
      11  
      12  __attribute__ ((noinline, noclone))
      13  int g (v2si A, int N)
      14  { return ((v4hi)A)[N]; }
      15  
      16  int main()
      17  {
      18    v2si x = { 0, 0 }, y = { 1, 1 };
      19    if (f (x, 0) || f (x, 1) || f (x, 2) || f (x, 3))
      20      __builtin_abort ();
      21    if (g (y, 0) != 1 || g (y, 1) || g (y, 2) != 1 || g (y, 3))
      22      __builtin_abort ();
      23    return 0;
      24  }
      25