PR c++/38639
* pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
just its type.
* g++.dg/gomp/pr38639.C: New test.
From-SVN: r142933
+2008-12-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/38639
+ * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
+ just its type.
+
2008-12-21 Jason Merrill <jason@redhat.com>
PR c++/38597
if (auto_node && init)
{
tree init_expr = init;
- tree orig_type;
if (TREE_CODE (init_expr) == DECL_EXPR)
init_expr = DECL_INITIAL (DECL_EXPR_DECL (init_expr));
- orig_type = TREE_TYPE (init_expr);
- TREE_TYPE (init_expr) = RECUR (TREE_TYPE (init_expr));
+ init_expr = RECUR (init_expr);
TREE_TYPE (decl)
= do_auto_deduction (TREE_TYPE (decl), init_expr, auto_node);
- TREE_TYPE (init_expr) = orig_type;
}
gcc_assert (!type_dependent_expression_p (decl));
+2008-12-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/38639
+ * g++.dg/gomp/pr38639.C: New test.
+
2008-12-23 Andrew Pinski <pinskia@gmail.com>
PR middle-end/38590
--- /dev/null
+// PR c++/38639
+// { dg-do compile }
+// { dg-options "-fopenmp -std=c++0x" }
+
+template<int> void
+foo ()
+{
+#pragma omp parallel for
+ for (auto i = i = 0; i<4; ++i) // { dg-error "incomplete|unable|invalid" }
+ ;
+}
+
+void
+bar ()
+{
+ foo<0> (); // { dg-message "instantiated from here" }
+}