diff options
| -rw-r--r-- | gcc/testsuite/gcc.c-torture/ChangeLog | 10 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20000402-1.c | 33 |
2 files changed, 42 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog index 58144f260fc..e26dc7d8761 100644 --- a/gcc/testsuite/gcc.c-torture/ChangeLog +++ b/gcc/testsuite/gcc.c-torture/ChangeLog @@ -1,6 +1,14 @@ +2000-04-03 Geoff Keating <geoffk@cygnus.com> + + * execute/20000402-1.c: New test. + Mon Apr 3 14:10:34 2000 Donald Lindsay <dlindsay@cygnus.com> - * execute/va-arg-{15,16,17,18,19}.c: New test. + * execute/va-arg-15.c: New test. + * execute/va-arg-16.c: New test. + * execute/va-arg-17.c: New test. + * execute/va-arg-18.c: New test. + * execute/va-arg-19.c: New test. 2000-03-26 Bernd Schmidt <bernds@cygnus.co.uk> diff --git a/gcc/testsuite/gcc.c-torture/execute/20000402-1.c b/gcc/testsuite/gcc.c-torture/execute/20000402-1.c new file mode 100644 index 00000000000..2c9e04fda42 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20000402-1.c @@ -0,0 +1,33 @@ +#include <limits.h> + +#if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull +int main(void) { exit (0); } +#else +#if ULONG_MAX != 18446744073709551615ull +typedef unsigned long long ull; +#else +typedef unsigned long ull; +#endif + +#include <stdio.h> + +void checkit(int); + +main () { + const ull a = 0x1400000000ULL; + const ull b = 0x80000000ULL; + const ull c = a/b; + const ull d = 0x1400000000ULL / 0x80000000ULL; + + checkit ((int) c); + checkit ((int) d); + + exit(0); +} + +void checkit (int a) +{ + if (a != 40) + abort(); +} +#endif |

