(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr52693.c
       1  /* { dg-do run } */
       2  
       3  struct pair
       4  {
       5    int x;
       6    int y;
       7  };
       8  
       9  struct array
      10  {
      11    struct pair elems[ 2 ];
      12    unsigned index;
      13  };
      14  
      15  extern void abort ();
      16  
      17  void __attribute__ ((noinline,noclone))
      18  test_results (int x1, int y1, int x2, int y2)
      19  {
      20    if (x1 != x2 || y1 != y2)
      21      abort ();
      22  }
      23  
      24  int
      25  main (void)
      26  {
      27    struct array arr = {{{1,2}, {3,4}}, 1};
      28    struct pair last = arr.elems[arr.index];
      29  
      30    test_results ( last.x, last.y, arr.elems[1].x, arr.elems[1].y);
      31  
      32    return 0;
      33  }