Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / gcc.c-torture / compile / pr26255.c
blobdf3f0d9266186e85b0dae8c5bc9bfc362f733679
1 typedef short int16_t;
3 int round_sample(int *sum);
5 #define MULS(ra, rb) ((ra) * (rb))
7 #define SUM8(sum, op, w, p) \
8 { \
9 sum op MULS((w)[0 * 64], p[0 * 64]); \
10 sum op MULS((w)[1 * 64], p[1 * 64]); \
11 sum op MULS((w)[2 * 64], p[2 * 64]); \
12 sum op MULS((w)[3 * 64], p[3 * 64]); \
13 sum op MULS((w)[4 * 64], p[4 * 64]); \
14 sum op MULS((w)[5 * 64], p[5 * 64]); \
15 sum op MULS((w)[6 * 64], p[6 * 64]); \
16 sum op MULS((w)[7 * 64], p[7 * 64]); \
19 void foo(int *dither_state, int *samples)
21 int16_t *synth_buf;
22 const int16_t *w, *p;
23 int sum;
25 sum = *dither_state;
26 p = synth_buf + 16;
27 SUM8(sum, +=, w, p);
28 p = synth_buf + 48;
29 SUM8(sum, -=, w + 32, p);
30 *samples = round_sample(&sum);