]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/60331 (ICE with OpenMP #pragma omp declare reduction in template class)
authorJakub Jelinek <jakub@redhat.com>
Tue, 25 Mar 2014 09:30:10 +0000 (10:30 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 25 Mar 2014 09:30:10 +0000 (10:30 +0100)
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

12 files changed:
gcc/cp/ChangeLog
gcc/cp/semantics.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/udr-11.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-12.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-13.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-14.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-15.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-16.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-17.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-18.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/udr-19.C [new file with mode: 0644]

index e0229906de3713bd5321088b65d651c6e9cf6b1e..a5a369564de15b24771c404b227c876a764f9934 100644 (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
index 886fbb88bc94b05ff9bf5e09a4a293724b844010..bb5246ab23aa625f136b4a9b2fe45abbe0fc83c9 100644 (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;
index e61756158a5875239830d67a7b2bed38253141fa..d3cda25384d3fba7f9bae2cd970870e4b3b6f0cc 100644 (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
diff --git a/libgomp/testsuite/libgomp.c++/udr-11.C b/libgomp/testsuite/libgomp.c++/udr-11.C
new file mode 100644 (file)
index 0000000..5d01446
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-1.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-12.C b/libgomp/testsuite/libgomp.c++/udr-12.C
new file mode 100644 (file)
index 0000000..58112eb
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-2.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-13.C b/libgomp/testsuite/libgomp.c++/udr-13.C
new file mode 100644 (file)
index 0000000..a9c8c60
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-3.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-14.C b/libgomp/testsuite/libgomp.c++/udr-14.C
new file mode 100644 (file)
index 0000000..6cb4829
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-4.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-15.C b/libgomp/testsuite/libgomp.c++/udr-15.C
new file mode 100644 (file)
index 0000000..d6aaf87
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-5.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-16.C b/libgomp/testsuite/libgomp.c++/udr-16.C
new file mode 100644 (file)
index 0000000..acf4ff2
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-6.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-17.C b/libgomp/testsuite/libgomp.c++/udr-17.C
new file mode 100644 (file)
index 0000000..a5b62f8
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-7.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-18.C b/libgomp/testsuite/libgomp.c++/udr-18.C
new file mode 100644 (file)
index 0000000..5911e8e
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-8.C"
diff --git a/libgomp/testsuite/libgomp.c++/udr-19.C b/libgomp/testsuite/libgomp.c++/udr-19.C
new file mode 100644 (file)
index 0000000..801cab4
--- /dev/null
@@ -0,0 +1,4 @@
+// { dg-do run }
+// { dg-options "-fopenmp -std=c++11" }
+
+#include "udr-9.C"