1289260Sbapt/* Test whether a partly call-clobbered register will be moved over a call.
2289260Sbapt   Although the original test case didn't use any GNUisms, it proved
3289260Sbapt   difficult to reduce without the named register extension.  */
4289260Sbapt#if __SH64__ == 32
5289260Sbapt#define LOC asm ("r10")
6289260Sbapt#else
7289260Sbapt#define LOC
8289260Sbapt#endif
9289260Sbapt
10289260Sbaptunsigned int foo (char *c, unsigned int x, unsigned int y)
11289260Sbapt{
12289260Sbapt  register unsigned int z LOC;
13289260Sbapt
14289260Sbapt  sprintf (c, "%d", x / y);
15289260Sbapt  z = x + 1;
16289260Sbapt  return z / (y + 1);
17289260Sbapt}
18289260Sbapt
19289260Sbaptint main ()
20289260Sbapt{
21289260Sbapt  char c[16];
22289260Sbapt
23289260Sbapt  if (foo (c, ~1U, 4) != (~0U / 5))
24289260Sbapt    abort ();
25289260Sbapt  exit (0);
26289260Sbapt}
27289260Sbapt