(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr41033.c
       1  /* { dg-options "-O1 -fno-strict-aliasing" } */
       2  /* PR rtl-optimization/41033 */
       3  
       4  struct X {
       5    int i;
       6    int j;
       7  };
       8  
       9  int foo(struct X *p, struct X *q)
      10  {
      11    p->j = 1;
      12    q->i = 0;
      13    return p->j;
      14  }
      15  
      16  extern void abort (void);
      17  
      18  int main()
      19  {
      20    struct X x;
      21    if (foo (&x, (struct X *)&x.j) != 0)
      22      abort ();
      23    return 0;
      24  }