From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; 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. --- gcc/testsuite/gcc.c-torture/compile/pr26255.c | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr26255.c (limited to 'gcc/testsuite/gcc.c-torture/compile/pr26255.c') 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 000000000..df3f0d926 --- /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); +} -- cgit v1.2.3