2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20000402-1.c
blob2c9e04fda42b478b5db106775d98dbcabe4bc966
1 #include <limits.h>
3 #if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull
4 int main(void) { exit (0); }
5 #else
6 #if ULONG_MAX != 18446744073709551615ull
7 typedef unsigned long long ull;
8 #else
9 typedef unsigned long ull;
10 #endif
12 #include <stdio.h>
14 void checkit(int);
16 main () {
17 const ull a = 0x1400000000ULL;
18 const ull b = 0x80000000ULL;
19 const ull c = a/b;
20 const ull d = 0x1400000000ULL / 0x80000000ULL;
22 checkit ((int) c);
23 checkit ((int) d);
25 exit(0);
28 void checkit (int a)
30 if (a != 40)
31 abort();
33 #endif