PR c++/84791
* semantics.c (finish_omp_reduction_clause): If
OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
even if processing_template_decl.
* g++.dg/gomp/pr84791.C: New test.
From-SVN: r258981
+2018-03-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84791
+ * semantics.c (finish_omp_reduction_clause): If
+ OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
+ even if processing_template_decl.
+
2018-03-29 David Malcolm <dmalcolm@redhat.com>
PR c++/84269
return false;
}
else if (processing_template_decl)
- return false;
+ {
+ if (OMP_CLAUSE_REDUCTION_PLACEHOLDER (c) == error_mark_node)
+ return true;
+ return false;
+ }
tree id = OMP_CLAUSE_REDUCTION_PLACEHOLDER (c);
+2018-03-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84791
+ * g++.dg/gomp/pr84791.C: New test.
+
2018-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84931
--- /dev/null
+// PR c++/84791
+// { dg-do compile }
+
+typedef int I;
+
+template <int>
+void
+foo ()
+{
+ I i;
+ #pragma omp parallel reduction (I::I: i) // { dg-error "'I' is not a class, namespace, or enumeration" "" { target c++11 } }
+ ; // { dg-error "'I' is not a class or namespace" "" { target c++98_only } .-1 }
+}
+
+template void foo<0> ();