Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / gcc.dg / debug / pr57351.c
blob972f3e9ebecc703d66afe5e801c7e3ca796ffe56
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_neon } */
3 /* { dg-options "-std=c99 -Os -g -march=armv7-a" } */
4 /* { dg-add-options arm_neon } */
6 typedef unsigned int size_t;
7 typedef int ptrdiff_t;
8 typedef signed char int8_t ;
9 typedef signed long long int64_t;
10 typedef int8_t GFC_INTEGER_1;
11 typedef GFC_INTEGER_1 GFC_LOGICAL_1;
12 typedef int64_t GFC_INTEGER_8;
13 typedef GFC_INTEGER_8 GFC_LOGICAL_8;
14 typedef ptrdiff_t index_type;
15 typedef struct descriptor_dimension
17 index_type lower_bound;
18 index_type _ubound;
20 descriptor_dimension;
21 typedef struct { GFC_LOGICAL_1 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l1;
22 typedef struct { GFC_LOGICAL_8 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l8;
23 void
24 all_l8 (gfc_array_l8 * const restrict retarray,
25 gfc_array_l1 * const restrict array,
26 const index_type * const restrict pdim)
28 GFC_LOGICAL_8 * restrict dest;
29 index_type n;
30 index_type len;
31 index_type delta;
32 index_type dim;
33 dim = (*pdim) - 1;
34 len = ((array)->dim[dim]._ubound + 1 - (array)->dim[dim].lower_bound);
35 for (n = 0; n < dim; n++)
37 const GFC_LOGICAL_1 * restrict src;
38 GFC_LOGICAL_8 result;
40 result = 1;
42 for (n = 0; n < len; n++, src += delta)
44 if (! *src)
46 result = 0;
47 break;
50 *dest = result;