summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20001023-1.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-09 21:34:32 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-09 21:34:32 +0000
commitb09c4d7fb4ad74dd69c3bcbdb34cb94cec3991d1 (patch)
treee53b44bfb8f28d7d86ab9b90e9b93538b696c016 /gcc/testsuite/gcc.dg/20001023-1.c
parent67494a80d9555500413b4b348545a64dbace1949 (diff)
downloadgcc-b09c4d7fb4ad74dd69c3bcbdb34cb94cec3991d1.tar.gz
* gcc.c-torture/compile/20010226-1.c: New test.
* gcc.c-torture/compile/20010227-1.c: New test. * gcc.c-torture/compile/20010426-1.c: New test. * gcc.c-torture/compile/20010510-1.c: New test. * gcc.c-torture/compile/20010605-3.c: New test. * gcc.c-torture/compile/20010824-1.c: New test. * gcc.c-torture/execute/20010409-1.c: New test. * gcc.dg/noncompile/20000901-1.c: New test. * gcc.dg/20001023-1.c: New test. * gcc.dg/20001101-1.c: New test. * gcc.dg/20001102-1.c: New test. * gcc.dg/20010207-1.c: New test. * gcc.dg/20010405-1.c: New test. * gcc.dg/20010822-1.c: New test. * gcc.dg/20011107-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20001023-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20001023-1.c59
1 files changed, 59 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 00000000000..ce5e532ea6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20001023-1.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+
+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);
+}