diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/20001023-1.c | |
download | cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2 cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
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.
Diffstat (limited to 'gcc/testsuite/gcc.dg/20001023-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20001023-1.c | 62 |
1 files changed, 62 insertions, 0 deletions
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); +} |