/cp
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59628
* semantics.c (finish_omp_reduction_clause): Early return true
if DECL_SAVED_TREE (id) is NULL_TREE.
/testsuite
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59628
* g++.dg/gomp/pr59628.C: New.
From-SVN: r218692
+2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59628
+ * semantics.c (finish_omp_reduction_clause): Early return true
+ if DECL_SAVED_TREE (id) is NULL_TREE.
+
2014-12-12 Jason Merrill <jason@redhat.com>
N3922
id = OVL_CURRENT (id);
mark_used (id);
tree body = DECL_SAVED_TREE (id);
+ if (!body)
+ return true;
if (TREE_CODE (body) == STATEMENT_LIST)
{
tree_stmt_iterator tsi;
+2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59628
+ * g++.dg/gomp/pr59628.C: New.
+
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61924
--- /dev/null
+// PR c++/59628
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct A { int i; };
+
+void foo()
+{
+ A a;
+ #pragma omp declare reduction (+: A: omp_out.i +: omp_in.i) // { dg-error "expected" }
+ #pragma omp parallel reduction (+: a)
+ ;
+}