re PR c++/60331 (ICE with OpenMP #pragma omp declare reduction in template class)

PR c++/60331
	* semantics.c (potential_constant_expression_1): Handle
	DECL_EXPR.

	* testsuite/libgomp.c++/udr-11.C: New test.
	* testsuite/libgomp.c++/udr-12.C: New test.
	* testsuite/libgomp.c++/udr-13.C: New test.
	* testsuite/libgomp.c++/udr-14.C: New test.
	* testsuite/libgomp.c++/udr-15.C: New test.
	* testsuite/libgomp.c++/udr-16.C: New test.
	* testsuite/libgomp.c++/udr-17.C: New test.
	* testsuite/libgomp.c++/udr-18.C: New test.
	* testsuite/libgomp.c++/udr-19.C: New test.

From-SVN: r208806
This commit is contained in:
Jakub Jelinek 2014-03-25 10:30:10 +01:00 committed by Jakub Jelinek
parent 51ee05d038
commit 8bcc90b0af
12 changed files with 56 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-03-25 Jakub Jelinek <jakub@redhat.com>
PR c++/60331
* semantics.c (potential_constant_expression_1): Handle
DECL_EXPR.
2014-03-24 Adam Butcher <adam@jessamine.co.uk>
PR c++/60627

View File

@ -10253,6 +10253,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case DO_STMT:
case FOR_STMT:
case WHILE_STMT:
case DECL_EXPR:
if (flags & tf_error)
error ("expression %qE is not a constant-expression", t);
return false;

View File

@ -1,3 +1,16 @@
2014-03-25 Jakub Jelinek <jakub@redhat.com>
PR c++/60331
* testsuite/libgomp.c++/udr-11.C: New test.
* testsuite/libgomp.c++/udr-12.C: New test.
* testsuite/libgomp.c++/udr-13.C: New test.
* testsuite/libgomp.c++/udr-14.C: New test.
* testsuite/libgomp.c++/udr-15.C: New test.
* testsuite/libgomp.c++/udr-16.C: New test.
* testsuite/libgomp.c++/udr-17.C: New test.
* testsuite/libgomp.c++/udr-18.C: New test.
* testsuite/libgomp.c++/udr-19.C: New test.
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-1.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-2.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-3.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-4.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-5.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-6.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-7.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-8.C"

View File

@ -0,0 +1,4 @@
// { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-9.C"