(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
fold-cvect.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O" } */
       3  
       4  extern void abort (void);
       5  
       6  /* We should fold all reads from xconstant and eliminate it, removing
       7     the reference to blah which cannot be resolved at link time.  */
       8  extern int blah;
       9  
      10  typedef int v4si __attribute__((vector_size(16)));
      11  
      12  static const struct {
      13      int *y;
      14      const v4si x[2] __attribute__((aligned(32)));
      15  } xconstant = { &blah, { { 0, 1, 2, 3 }, { 2, 3, 4, 5 } } };
      16  
      17  int main()
      18  {
      19    if (sizeof (int) != 4)
      20      return 0;
      21    if (*(int *)&xconstant.x[0][0] != 0)
      22      abort ();
      23    if (*(int *)&xconstant.x[0][1] != 1)
      24      abort ();
      25    if (*(int *)&xconstant.x[0][2] != 2)
      26      abort ();
      27    if (*(int *)&xconstant.x[0][3] != 3)
      28      abort ();
      29    if (*(int *)&xconstant.x[1][0] != 2)
      30      abort ();
      31    if (*(int *)&xconstant.x[1][1] != 3)
      32      abort ();
      33    if (*(int *)&xconstant.x[1][2] != 4)
      34      abort ();
      35    if (*(int *)&xconstant.x[1][3] != 5)
      36      abort ();
      37    return 0;
      38  }