gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85782.c
Cesar Philippidis 950ad0bafe re PR c++/85782 (acc loops with continue statements ICE in c++)
PR c++/85782

	gcc/cp/
	* cp-gimplify.c (cp_genericize_r): Call genericize_omp_for_stmt for
	OACC_LOOPs.

	gcc/testsuite/
	* c-c++-common/goacc/pr85782.c: New test.

	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/pr85782.c: New test.

From-SVN: r260369
2018-05-18 08:43:09 -07:00

33 lines
375 B
C

/* PR c++/85782 */
#include <assert.h>
#define N 100
int
main ()
{
int i, a[N];
for (i = 0; i < N; i++)
a[i] = i+1;
#pragma acc parallel loop copy(a)
for (i = 0; i < N; i++)
{
if (i % 2)
continue;
a[i] = 0;
}
for (i = 0; i < N; i++)
{
if (i % 2)
assert (a[i] == i+1);
else
assert (a[i] == 0);
}
return 0;
}