aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-03-25 10:30:10 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-03-25 10:30:10 +0100
commit8bcc90b0af63817589ea34fe0aff5d785d704444 (patch)
tree95d6d543658e14b87d9a9992c639185f613e010f /gcc
parent51ee05d03862c94da9d204fcb26c3c7602d40a25 (diff)
downloadgcc-8bcc90b0af63817589ea34fe0aff5d785d704444.zip
gcc-8bcc90b0af63817589ea34fe0aff5d785d704444.tar.gz
gcc-8bcc90b0af63817589ea34fe0aff5d785d704444.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/semantics.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e022990..a5a3695 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 886fbb8..bb5246a 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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;