Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / array-field-1.c
blob6dd8b5c48e1ec1c0109dbdc5493520df92d2cb1a
1 /* { dg-do run } */
3 #include <stdlib.h>
4 #include <string.h>
5 #include <assert.h>
7 #define N 16
9 struct Z {
10 int *ptr;
11 int arr[N];
12 int c;
15 int main (int argc, char *argv[])
17 struct Z *myz;
18 myz = (struct Z *) calloc (1, sizeof *myz);
20 #pragma omp target map(tofrom:myz->arr[0:N], myz->c)
22 for (int i = 0; i < N; i++)
23 myz->arr[i]++;
24 myz->c++;
27 for (int i = 0; i < N; i++)
28 assert (myz->arr[i] == 1);
29 assert (myz->c == 1);
31 free (myz);
33 return 0;