aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr22362.c
blob: 04d6b27069cc5f9e78a4fa40ca1859674fadbd55 (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
/* PR target/22362 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-require-effective-target ia32 } */

register unsigned int reg0 __asm__ ("esi");
register unsigned int reg1 __asm__ ("edi");
register unsigned int reg2 __asm__ ("ebx");

static unsigned int
__attribute__((noinline))
foo (unsigned long *x, void *y, void *z)
{
  int i;

  for (i = 5; i > 0; i--)
    x[i] = (unsigned long) foo ((unsigned long *) x[i], y, z);
  return 0;
}

unsigned int
bar (void)
{
  return foo (0, 0, 0);
}