1222f22bd8
2015-06-23 Tom de Vries <tom@codesourcery.com> * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Use abort. * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c (main): Same. From-SVN: r224849
38 lines
490 B
C
38 lines
490 B
C
/* { dg-do run } */
|
|
/* { dg-additional-options "-ftree-parallelize-loops=2" } */
|
|
|
|
/* Constant bound, reduction. */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define N 4000
|
|
|
|
unsigned int *a;
|
|
|
|
unsigned int
|
|
f (void)
|
|
{
|
|
int i;
|
|
unsigned int sum = 1;
|
|
|
|
for (i = 0; i < N; ++i)
|
|
sum += a[i];
|
|
|
|
return sum;
|
|
}
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
unsigned int res;
|
|
unsigned int array[N];
|
|
int i;
|
|
for (i = 0; i < N; ++i)
|
|
array[i] = i % 7;
|
|
a = &array[0];
|
|
res = f ();
|
|
if (res != 11995)
|
|
abort ();
|
|
return 0;
|
|
}
|