From 7837ac3cc7481f80685feb00bb7ac0d063fd9da6 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Mon, 24 Mar 2008 23:05:31 +0000 Subject: [PATCH] re PR rtl-optimization/26222 (build failuring in libjava) 2008-03-24 Andrew Pinski PR middle-end/26222 * gcc.dg/torture/pr26222.c: New testcase. From-SVN: r133493 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr26222.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr26222.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4ce37ec18d0..942600c9a10 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-03-24 Andrew Pinski + + PR middle-end/26222 + * gcc.dg/torture/pr26222.c: New testcase. + 2008-03-24 Paul Thomas PR fortran/34813 diff --git a/gcc/testsuite/gcc.dg/torture/pr26222.c b/gcc/testsuite/gcc.dg/torture/pr26222.c new file mode 100644 index 00000000000..b580db67354 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr26222.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-fno-tree-pre -fno-tree-loop-im" } */ + +void putShort (int, int); + +int t2; +void f(int t1) +{ + int clutOffset = 52 + 256 * 3 * 2; + int x, y, z; + for (x = 0; x < 16; x++) + for (y = 0; y < 16; y++) + for (z = 0; z < 16; z++) + { + int offset = clutOffset + z * 6 + y * 16 * 6 + x * 16 * 16 * 6; + double xf = ((double) x) / ((double) 16 - 1.0); + double tt = xf; + putShort(offset, tt); + } +} +