gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
Rainer Orth f320fdfd22 Fix libgomp.oacc-c-c++-common/pr84217.c for C++
* testsuite/libgomp.oacc-c-c++-common/pr84217.c (abort)
	[__cplusplus]: Declare extern "C".

From-SVN: r257457
2018-02-07 19:32:21 +00:00

27 lines
314 B
C

extern
#ifdef __cplusplus
"C"
#endif
void abort (void);
#define N 10
int
main (void)
{
int a[N];
for (short i = 0; i < N; ++i)
a[i] = -1;
#pragma acc parallel loop tile (2)
for (short i = 0; i < N; ++i)
a[i] = i;
for (short i = 0; i < N; ++i)
if (a[i] != i)
abort ();
return 0;
}