2007-04-26 Jakub Jelinek <jakub@redhat.com>
+ PR c++/31598
+ * tree-inline.c (copy_body_r): Don't touch TREE_TYPE of OMP_CLAUSE.
+
PR tree-optimization/30558
* tree-eh.c (lower_eh_filter): If EH_FILTER_MUST_NOT_THROW
clear this_state.prev_try.
+2007-04-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/31598
+ * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
+ for type dependent OMP_CLAUSE_DECLs.
+
2007-04-24 Mark Mitchell <mark@codesourcery.com>
PR c++/31338
Save the results, because later we won't be in the right context
for making these queries. */
if (CLASS_TYPE_P (inner_type)
- && (need_default_ctor || need_copy_ctor || need_copy_assignment))
+ && (need_default_ctor || need_copy_ctor || need_copy_assignment)
+ && !type_dependent_expression_p (t))
{
int save_errorcount = errorcount;
tree info;
2007-04-26 Jakub Jelinek <jakub@redhat.com>
+ PR c++/31598
+ * g++.dg/gomp/pr31598.C: New test.
+
PR tree-optimization/30558
* g++.dg/gomp/pr30558.C: New test.
--- /dev/null
+// PR c++/31598
+// { dg-do compile }
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+// Contributed by Theodore.Papadopoulo
+// 16 Apr 2007 <Theodore.Papadopoulo@sophia.inria.fr>
+
+int i;
+template <typename> struct A { A() {} };
+template <typename> struct C { C() { i++; } C(const C &) { i += 2; } };
+struct D { D() {} };
+
+struct M { typedef double E; };
+
+template <typename T>
+struct R
+{
+ R()
+ {
+ typedef A<typename T::E> B;
+ B b;
+ #pragma omp parallel for firstprivate(b) schedule(guided)
+ for (int t = 0; t < 10; ++t)
+ ;
+ }
+};
+
+template <typename T>
+struct S
+{
+ S()
+ {
+ typedef C<typename T::E> B;
+ B b;
+ #pragma omp parallel for firstprivate(b)
+ for (int t = 0; t < 10; ++t)
+ ;
+ }
+};
+
+struct U
+{
+ U()
+ {
+ D b;
+ #pragma omp parallel for firstprivate(b)
+ for (int t = 0; t < 10; ++t)
+ ;
+ }
+};
+
+int
+main ()
+{
+ R<M> r;
+ S<M> s;
+ U u;
+ return 0;
+}
(NULL_TREE,
id->eh_region_offset + TREE_INT_CST_LOW (TREE_OPERAND (*tp, 0)));
- if (!GIMPLE_TUPLE_P (*tp))
+ if (!GIMPLE_TUPLE_P (*tp) && TREE_CODE (*tp) != OMP_CLAUSE)
TREE_TYPE (*tp) = remap_type (TREE_TYPE (*tp), id);
/* The copied TARGET_EXPR has never been expanded, even if the