1#include <limits.h>
2
3#if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull
4int main(void) { exit (0); }
5#else
6#if ULONG_MAX != 18446744073709551615ull
7typedef unsigned long long ull;
8#else
9typedef unsigned long ull;
10#endif
11
12#include <stdio.h>
13
14void checkit(int);
15
16main () {
17    const ull a = 0x1400000000ULL;
18    const ull b = 0x80000000ULL;
19    const ull c = a/b;
20    const ull d = 0x1400000000ULL / 0x80000000ULL;
21
22    checkit ((int) c);
23    checkit ((int) d);
24
25    exit(0);
26}
27
28void checkit (int a)
29{
30  if (a != 40)
31    abort();
32}
33#endif
34