aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/vect-early-break_104-pr113373.c
blob: 1601aafb3e6f5e99d0e2bc96b10e062ad281bdeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-add-options vect_early_break } */
/* { dg-require-effective-target vect_early_break } */

struct asCArray {
  unsigned *array;
  int length;
};
unsigned asCReaderTranslateFunction(struct asCArray b, unsigned t)
{
  int size = 0;
  for (unsigned num; num < t; num++)
  {
    if (num >= b.length)
      __builtin_abort();
    size += b.array[num];
  }
  return size;
}