aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr88414.c
blob: 99a471e4ecee92db6e852a2e1ef739f90a08519d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do compile } */
/* { dg-options "-O1 -ftrapv" } */

unsigned int
foo (unsigned int *x, const unsigned int *y, int z, unsigned int w)
{
  unsigned int a, b, c, s;
  int j;
  j = -z;
  x -= j;
  y -= j;
  a = 0;
  do
    {
      asm volatile ("" : "=d" (b), "=d" (c) : "r" (y[j]), "d" (w)); /* { dg-error "'asm' operand has impossible constraints" } */
      c += a;
      a = (c < a) + b;
      s = x[j];
      c = s + c;
      a += (c < s);
      x[j] = c;
    }
  while (++j != 0);
  return a;
}