+2015-09-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/67511
+ * semantics.c (handle_omp_for_class_iterator): Don't wrap
+ error_mark_node into a NOP_EXPR to void_type_node.
+
2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53184
iter_init = build_x_modify_expr (elocus,
iter, PLUS_EXPR, iter_init,
tf_warning_or_error);
- iter_init = build1 (NOP_EXPR, void_type_node, iter_init);
+ if (iter_init != error_mark_node)
+ iter_init = build1 (NOP_EXPR, void_type_node, iter_init);
finish_expr_stmt (iter_init);
finish_expr_stmt (build_x_modify_expr (elocus,
last, NOP_EXPR, decl,
2015-09-10 Jakub Jelinek <jakub@redhat.com>
+ PR c++/67511
+ * g++.dg/gomp/pr67511.C: New test.
+
PR c/67502
* c-c++-common/gomp/pr67502.c: New test.
--- /dev/null
+// PR c++/67511
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct I
+{
+ I ();
+ I (const I &);
+ I &operator++ ();
+ bool operator< (const I &) const;
+};
+__PTRDIFF_TYPE__ operator- (const I &, const I &);
+
+void
+foo (I &x, I &y)
+{
+#pragma omp for
+ for (I i = x; i < y; ++i) // { dg-error "no match for" }
+ ;
+}