gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/vprop.c
Cesar Philippidis f6c1032d03 re PR testsuite/70009 (test case libgomp.oacc-c-c++-common/vprop.c fails starting with its introduction in r233607)
libgomp/
	PR testsuite/70009
	* testsuite/libgomp.oacc-c-c++-common/vprop.c: Make test data signed.

From-SVN: r234124
2016-03-10 14:50:40 -08:00

35 lines
615 B
C

#include <assert.h>
#define test(type) \
void \
test_##type () \
{ \
signed type b[100]; \
signed type i, j, x = -1, y = -1; \
\
_Pragma("acc parallel loop copyout (b)") \
for (j = 0; j > -5; j--) \
{ \
type c = x+y; \
_Pragma("acc loop vector") \
for (i = 0; i < 20; i++) \
b[-j*20 + i] = c; \
b[5-j] = c; \
} \
\
for (i = 0; i < 100; i++) \
assert (b[i] == -2); \
}
test(char)
test(short)
int
main ()
{
test_char ();
test_short ();
return 0;
}