1  /* { dg-do compile } */
       2  /* { dg-require-effective-target arm_neon }  */
       3  /* { dg-require-effective-target arm_arch_v7a_ok }  */
       4  /* { dg-options "-std=c99 -Os -g -march=armv7-a" } */
       5  /* { dg-add-options arm_neon } */
       6  
       7  typedef unsigned int size_t;
       8  typedef int ptrdiff_t;
       9  typedef signed char int8_t ;
      10  typedef signed long long int64_t;
      11  typedef int8_t GFC_INTEGER_1;
      12  typedef GFC_INTEGER_1 GFC_LOGICAL_1;
      13  typedef int64_t GFC_INTEGER_8;
      14  typedef GFC_INTEGER_8 GFC_LOGICAL_8;
      15  typedef ptrdiff_t index_type;
      16  typedef struct descriptor_dimension
      17  {
      18    index_type lower_bound;
      19    index_type _ubound;
      20  }
      21  descriptor_dimension;
      22  typedef struct { GFC_LOGICAL_1 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l1;
      23  typedef struct { GFC_LOGICAL_8 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l8;
      24  void
      25  all_l8 (gfc_array_l8 * const restrict retarray,
      26   gfc_array_l1 * const restrict array,
      27   const index_type * const restrict pdim)
      28  {
      29    GFC_LOGICAL_8 * restrict dest;
      30    index_type n;
      31    index_type len;
      32    index_type delta;
      33    index_type dim;
      34    dim = (*pdim) - 1;
      35    len = ((array)->dim[dim]._ubound + 1 - (array)->dim[dim].lower_bound);
      36    for (n = 0; n < dim; n++)
      37      {
      38        const GFC_LOGICAL_1 * restrict src;
      39        GFC_LOGICAL_8 result;
      40        {
      41    result = 1;
      42     {
      43       for (n = 0; n < len; n++, src += delta)
      44         {
      45    if (! *src)
      46      {
      47        result = 0;
      48        break;
      49      }
      50            }
      51       *dest = result;
      52     }
      53        }
      54      }
      55  }