Commit 1d5d6f3f by Nick Clifton Committed by Nick Clifton

Add extra tests (for modulos of very large dividends by very small divisors)

From-SVN: r36561
parent 968d9d61
2000-09-21 Nick Clifton <nickc@redhat.com>
* gcc.c-torture/execute/divmod-1.c (mod5): New function - perform
a signed long modulo operation.
(mod6): New funciton - perform an unsigned long modulo operation.
(main): Add tests for modulos of very large numbers by very small
dividends.
2000-09-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.other/virtual8.C: Declare printf correctly.
......
......@@ -50,6 +50,22 @@ mod4 (x, y)
return x % y;
}
signed long
mod5 (x, y)
signed long x;
signed long y;
{
return x % y;
}
unsigned long
mod6 (x, y)
unsigned long x;
unsigned long y;
{
return x % y;
}
main ()
{
if (div1 (-(1 << 7)) != 1 << 7)
......@@ -68,5 +84,10 @@ main ()
abort ();
if (mod4 (-(1 << 15), -1) != 0)
abort ();
if (mod5 (0x50000000, 2) != 0)
abort ();
if (mod6 (0x50000000, 2) != 0)
abort ();
exit (0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment