summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted/signext.c
blob: 2724098d0318696cb8d3124a1d9e67ddc83d47a6 (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
26
27
void longprint (x)
     long long x;
{
  printf (" %d, %d\n", (unsigned) ((unsigned long long) x >> 32),
	  (unsigned) x);
}

void
k_min (p, qa, d)
     int d;
{
  int s = 1;
  long long x;

  if (s >= d)
    s -= d;

  x = ((long long)((8 * s) % 3) + qa) % d;
  longprint (x);
}

int
main ()
{
  k_min (100003, -600017, 3);
  return 0;
}