re PR target/26255 (internal compiler error: in reload_cse_simplify_operands, at...
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 17 Feb 2006 22:09:58 +0000 (22:09 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 17 Feb 2006 22:09:58 +0000 (22:09 +0000)
PR target/26255
* gcc.c-torture/compile/pr26255.c: New test case.

From-SVN: r111213

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr26255.c [new file with mode: 0644]

index 78d593d75a23561a4887e316c5887d414d12b4fb..af4ac3c04b1f8d95fc1e833a30ccd85ebde843c5 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-16  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/26255
+       * gcc.c-torture/compile/pr26255.c: New test case.
+
 2006-02-16  Roger Sayle  <roger@eyesopen.com>
 
        * gfortran.fortran-torture/execute/where_10.f90: New test case.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr26255.c b/gcc/testsuite/gcc.c-torture/compile/pr26255.c
new file mode 100644 (file)
index 0000000..df3f0d9
--- /dev/null
@@ -0,0 +1,31 @@
+typedef short int16_t;
+
+int round_sample(int *sum);
+
+#define MULS(ra, rb) ((ra) * (rb))
+
+#define SUM8(sum, op, w, p) \
+{ \
+  sum op MULS((w)[0 * 64], p[0 * 64]); \
+  sum op MULS((w)[1 * 64], p[1 * 64]); \
+  sum op MULS((w)[2 * 64], p[2 * 64]); \
+  sum op MULS((w)[3 * 64], p[3 * 64]); \
+  sum op MULS((w)[4 * 64], p[4 * 64]); \
+  sum op MULS((w)[5 * 64], p[5 * 64]); \
+  sum op MULS((w)[6 * 64], p[6 * 64]); \
+  sum op MULS((w)[7 * 64], p[7 * 64]); \
+}
+
+void foo(int *dither_state, int *samples)
+{
+  int16_t *synth_buf;
+  const int16_t *w, *p;
+  int sum;
+
+  sum = *dither_state;
+  p = synth_buf + 16;
+  SUM8(sum, +=, w, p);
+  p = synth_buf + 48;
+  SUM8(sum, -=, w + 32, p);
+  *samples = round_sample(&sum);
+}