summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/20011029-2.c
blob: 07ef1a806fec57405c18291795c85b9cfb05a738 (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
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2" } */

int foo (int s)
{
  for (;;)
    {
      int a[32];
      int y, z;
      __asm__ __volatile__ ("" : "=c" (y), "=D" (z)
			    : "a" (0), "0" (32), "1" (a) : "memory");
      if (({ register char r;
	     __asm__ __volatile__ ("" : "=q" (r)
				   : "r" (s % 32), "m" (a[s / 32])
				   : "cc"); r; }))
        continue;
      else if (({ register char r;
		  __asm__ __volatile__ ("" : "=q" (r)
					: "r" (0), "m" (a[0])
					: "cc"); r; }))
        continue;
    }
  return 0;
}
OpenPOWER on IntegriCloud