Daily bump.
[official-gcc.git] / libgomp / testsuite / libgomp.hsa.c / alloca-1.c
blob48dca94a47f55b412f1e0c9aa26bfb22ed2e46b8
1 #define size 10
2 int i, j, k;
4 int
5 main ()
7 char *s = __builtin_malloc (size + 1);
9 #pragma omp target teams
11 #pragma omp distribute parallel for default(none) private(i) shared(s)
12 for (i = 0; i < size; ++i)
14 char *buffer = __builtin_alloca (10);
15 buffer[5] = 97 + i;
16 s[i] = buffer[5];
20 for (i = 0; i < size; ++i)
21 if (s[i] != 97 + i)
22 __builtin_abort ();
24 return 0;