diff options
| author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-17 22:09:58 +0000 |
|---|---|---|
| committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-17 22:09:58 +0000 |
| commit | e49aa3049f19818b9fa4243daa23ce51c2d2f810 (patch) | |
| tree | 0104209913abd7c35a9a62045d4805b73393bcd0 | |
| parent | 9121151b85c4f2c5ed11191933e2dcc9f201cf78 (diff) | |
| download | ppe42-gcc-e49aa3049f19818b9fa4243daa23ce51c2d2f810.tar.gz ppe42-gcc-e49aa3049f19818b9fa4243daa23ce51c2d2f810.zip | |
PR target/26255
* gcc.c-torture/compile/pr26255.c: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111213 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr26255.c | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 78d593d75a2..af4ac3c04b1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 00000000000..df3f0d92661 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr26255.c @@ -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); +} |

