* gcc.c-torture/compile/20000329-1.c: New test.

From-SVN: r32815
This commit is contained in:
Jeffrey A Law 2000-03-29 20:48:06 +00:00 committed by Jeff Law
parent 700473ab02
commit 843cae51d5
2 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Wed Mar 29 13:44:23 2000 Jeffrey A Law (law@cygnus.com)
* gcc.c-torture/compile/20000329-1.c: New test.
2000-03-23 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.ext/array4.C: New test.

View File

@ -0,0 +1,40 @@
int giop_tx_big_endian;
inline
void
giop_encode_ulong (unsigned long i, char *buf)
{
if (giop_tx_big_endian)
{
*(unsigned long *) buf = i;
}
else
{
*buf++ = i & 0xff;
*buf++ = (i >> 8) & 0xff;
*buf++ = (i >> 16) & 0xff;
*buf = (i >> 24) & 0xff;
}
}
static
double
time_giop_encode (unsigned long l)
{
int c;
char buf[4];
for (c = 0; c < (512 * 1024 * 1024); ++c)
{
giop_encode_ulong (l, buf);
}
}
int
main (int ac, char *av[])
{
giop_tx_big_endian = 1;
time_giop_encode (0);
}