gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/gang-reduction-var-assignment.c
Tom de Vries d41d952c9b [nvptx] Handle assignment to gang-level reduction variable
2019-01-15  Tom de Vries  <tdevries@suse.de>

	PR target/80547
	* config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Handle
	lhs == NULL_TREE for gang-level reduction.

	* testsuite/libgomp.oacc-c-c++-common/gang-reduction-var-assignment.c:
	New test.

From-SVN: r267934
2019-01-15 10:11:16 +00:00

17 lines
222 B
C

/* { dg-xfail-run-if "PR88852" { openacc_host_selected } } */
int
main (void)
{
int x = 123;
#pragma acc parallel num_gangs(1) reduction (+: x)
{
x = 23;
}
if (x != 146)
__builtin_abort();
return 0;
}