annotate gcc/testsuite/gcc.dg/torture/pr47744-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-require-effective-target int128 } */
kono
parents:
diff changeset
3 /* { dg-options "-std=gnu99" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 typedef long unsigned int size_t;
kono
parents:
diff changeset
6 typedef long int ssize_t;
kono
parents:
diff changeset
7 typedef ssize_t index_type;
kono
parents:
diff changeset
8 typedef __int128_t GFC_INTEGER_16;
kono
parents:
diff changeset
9 typedef struct descriptor_dimension
kono
parents:
diff changeset
10 {
kono
parents:
diff changeset
11 index_type _stride;
kono
parents:
diff changeset
12 index_type _lbound;
kono
parents:
diff changeset
13 index_type _ubound;
kono
parents:
diff changeset
14 }
kono
parents:
diff changeset
15 descriptor_dimension;
kono
parents:
diff changeset
16 typedef struct { GFC_INTEGER_16 *data; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_i16;
kono
parents:
diff changeset
17 void
kono
parents:
diff changeset
18 matmul_i16 (gfc_array_i16 * const restrict retarray,
kono
parents:
diff changeset
19 gfc_array_i16 * const restrict a,
kono
parents:
diff changeset
20 GFC_INTEGER_16 bbase_yn)
kono
parents:
diff changeset
21 {
kono
parents:
diff changeset
22 GFC_INTEGER_16 * restrict dest;
kono
parents:
diff changeset
23 index_type rxstride, rystride;
kono
parents:
diff changeset
24 index_type x, y, n, count, xcount;
kono
parents:
diff changeset
25 GFC_INTEGER_16 * restrict dest_y;
kono
parents:
diff changeset
26 GFC_INTEGER_16 s;
kono
parents:
diff changeset
27 const GFC_INTEGER_16 * restrict abase_n;
kono
parents:
diff changeset
28 rxstride = ((retarray)->dim[0]._stride);
kono
parents:
diff changeset
29 rystride = ((retarray)->dim[1]._stride);
kono
parents:
diff changeset
30 xcount = ((a)->dim[0]._ubound + 1 - (a)->dim[0]._lbound);
kono
parents:
diff changeset
31 dest = retarray->data;
kono
parents:
diff changeset
32 dest_y = &dest[y*rystride];
kono
parents:
diff changeset
33 for (x = 0; x < xcount; x++)
kono
parents:
diff changeset
34 dest_y[x] += abase_n[x] * bbase_yn;
kono
parents:
diff changeset
35 for (x = 0; x < xcount; x++)
kono
parents:
diff changeset
36 {
kono
parents:
diff changeset
37 for (n = 0; n < count; n++)
kono
parents:
diff changeset
38 dest_y[x*rxstride] = (GFC_INTEGER_16) 0;
kono
parents:
diff changeset
39 }
kono
parents:
diff changeset
40 }