(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
20070302-1.c
       1  /* { dg-do link } */
       2  /* { dg-options "-O2" } */
       3  
       4  void link_error (void);
       5  
       6  struct A
       7  {
       8    int x;
       9    float y;
      10  };
      11  
      12  volatile float X, Y;
      13  
      14  int __attribute__ ((__noinline__))
      15  baz (struct A *z, struct A *y)
      16  {
      17    z->x = (int) X;
      18    z->y = Y;
      19    y->x = (int) X;
      20    y->y = Y;
      21  }
      22  
      23  
      24  struct A B;
      25  
      26  float foo (int i)
      27  {
      28    struct A *p, x, y, z;
      29  
      30    p = (i > 10) ? &x : &z;
      31    x.y = 3.0;
      32    p->x += baz (&z, &y);
      33    X = z.y;
      34    Y = p->y;
      35  
      36    /* This predicate should always evaluate to false.  The call to
      37       baz() is not a clobbering site for x.y.  The operand scanner was
      38       considering it a clobbering site for x.y because x.y is in the
      39       alias set of a call-clobbered memory tag.  */
      40    if (x.y != 3.0)
      41      link_error ();
      42  }
      43  
      44  int
      45  main(int argc, char **argv)
      46  {
      47    foo (argc);
      48  }