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
This commit is contained in:
Cesar Philippidis 2018-05-18 08:43:09 -07:00 committed by Cesar Philippidis
parent a9b22c3309
commit 950ad0bafe
6 changed files with 60 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2018-05-18 Cesar Philippidis <cesar@codesourcery.com>
PR c++/85782
* cp-gimplify.c (cp_genericize_r): Call genericize_omp_for_stmt for
OACC_LOOPs.
2018-05-18 Richard Sandiford <richard.sandiford@linaro.org> 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
* constexpr.c (cxx_eval_constant_expression): Remove FMA_EXPR handling. * constexpr.c (cxx_eval_constant_expression): Remove FMA_EXPR handling.

View File

@ -1463,6 +1463,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
case OMP_FOR: case OMP_FOR:
case OMP_SIMD: case OMP_SIMD:
case OMP_DISTRIBUTE: case OMP_DISTRIBUTE:
case OACC_LOOP:
genericize_omp_for_stmt (stmt_p, walk_subtrees, data); genericize_omp_for_stmt (stmt_p, walk_subtrees, data);
break; break;

View File

@ -1,3 +1,8 @@
2018-05-18 Cesar Philippidis <cesar@codesourcery.com>
PR c++/85782
* c-c++-common/goacc/pr85782.c: New test.
2018-05-18 Sudakshina Das <sudi.das@arm.com> 2018-05-18 Sudakshina Das <sudi.das@arm.com>
* gcc.target/aarch64/sve/slp_5.c: Remove xfail for tld1d and tld2d. * gcc.target/aarch64/sve/slp_5.c: Remove xfail for tld1d and tld2d.

View File

@ -0,0 +1,11 @@
/* PR c++/85782 */
void
foo ()
{
int i;
#pragma acc parallel loop
for (i = 0; i < 100; i++)
continue;
}

View File

@ -1,3 +1,8 @@
2018-05-18 Cesar Philippidis <cesar@codesourcery.com>
PR c++/85782
* testsuite/libgomp.oacc-c-c++-common/pr85782.c: New test.
2018-05-09 Tom de Vries <tom@codesourcery.com> 2018-05-09 Tom de Vries <tom@codesourcery.com>
PR libgomp/82901 PR libgomp/82901

View File

@ -0,0 +1,32 @@
/* 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;
}