(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
pr99123-2.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -funroll-loops" } */
       3  
       4  static inline void *
       5  baz (void *s, unsigned long c, unsigned int count)
       6  {
       7    int d0, d1;
       8    __asm__ __volatile__ (""
       9                          : "=&c" (d0), "=&D" (d1)
      10                          :"a" (c), "q" (count), "0" (count / 4), "" ((long) s)   /// "1"
      11                          :"memory");
      12    return s;
      13  }
      14  
      15  struct A
      16  {
      17    unsigned long *a;
      18  };
      19  
      20  inline static void *
      21  bar (struct A *x, int y)
      22  {
      23    char *ptr;
      24  
      25    ptr = (void *) x->a[y >> 12];
      26    ptr += y % (1UL << 12);
      27    return (void *) ptr;
      28  }
      29  
      30  int
      31  foo (struct A *x, unsigned int *y, int z, int u)
      32  {
      33    int a, b, c, d, e;
      34  
      35    z += *y;
      36    c = z + u;
      37    a = (z >> 12) + 1;
      38    do
      39      {
      40        b = (a << 12);
      41        d = b - z;
      42        e = c - z;
      43        if (e < d)
      44          d = e;
      45        baz (bar (x, z), 0, d);
      46        z = b;
      47        a++;
      48      }
      49    while (z < c);
      50    return 0;
      51  }