2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20000329-1.c
blob547bf96f95528a22db917f2f70a881fed54c45f6
1 int giop_tx_big_endian;
3 inline
4 void
5 giop_encode_ulong (unsigned long i, char *buf)
7 if (giop_tx_big_endian)
9 *(unsigned long *) buf = i;
11 else
13 *buf++ = i & 0xff;
14 *buf++ = (i >> 8) & 0xff;
15 *buf++ = (i >> 16) & 0xff;
16 *buf = (i >> 24) & 0xff;
22 static
23 double
24 time_giop_encode (unsigned long l)
26 int c;
27 char buf[4];
29 for (c = 0; c < (512 * 1024 * 1024); ++c)
31 giop_encode_ulong (l, buf);
35 int
36 main (int ac, char *av[])
38 giop_tx_big_endian = 1;
39 time_giop_encode (0);