From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.dg/20001023-1.c | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/20001023-1.c (limited to 'gcc/testsuite/gcc.dg/20001023-1.c') diff --git a/gcc/testsuite/gcc.dg/20001023-1.c b/gcc/testsuite/gcc.dg/20001023-1.c new file mode 100644 index 000000000..10cb27259 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20001023-1.c @@ -0,0 +1,62 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -fomit-frame-pointer" } */ + +extern void abort (void); +extern void exit (int); + +unsigned char a[256], b[256], c[256], d[256]; + +void foo(unsigned char *x, int y, unsigned char *z) +{ +} + +void bar(int x, ...) +{ +} + +void baz(int y) +{ + if (y != 0x10) + abort(); +} + +void test(int x, unsigned char *y) +{ + unsigned char g,h,j, k[5],l[5], m[30]; + int i; + + bar(x, y[0], y[1], y[2], y[3], y[4], y[5], y[6], y[7], y[8], y[9]); + for (i = 5; --i >= 0; ) + k[i] = y[5 + i] ^ a[i] ^ c[i]; + + foo(&m[29], sizeof m, k); + g = d[x] ^ c[x]; + bar(x, d[x], x, c[x]); + baz(g); + for (i = 5, h = 0; --i >= 0; h = y[i]) + { + j = m[25 + i] ^ y[i]; + j = b[j] ^ g; + k[i] = c[j] ^ h; + } + for (i = 5, h = 0; --i >= 0; h = k[i]) + { + j = m[20 + i] ^ k[i]; + j = b[j] ^ g; + l[i] = c[j] ^ h; + } + for (i = 5, h = 0; --i >= 0; h = l[i]) { + j = m[15 + i] ^ l[i]; + j = b[j] ^ g; + j = c[j] ^ h; + k[i] = a[j] ^ c[j]; + } +} + +int main() +{ + c[4] = 0xdc; + d[4] = 0xcc; + test(4, a); + exit(0); +} -- cgit v1.2.3