Commit 57c3feb4 by Jason Merrill Committed by Jason Merrill

* semantics.c (finish_omp_threadprivate): Call complete_type.

From-SVN: r192812
parent 4514a96b
2012-10-25 Jason Merrill <jason@redhat.com>
* semantics.c (finish_omp_threadprivate): Call complete_type.
* class.c (one_inherited_ctor): Warn about variadic inherited ctor.
2012-10-25 Marc Glisse <marc.glisse@inria.fr>
......
......@@ -4360,7 +4360,7 @@ finish_omp_threadprivate (tree vars)
error ("%qE declared %<threadprivate%> after first use", v);
else if (! TREE_STATIC (v) && ! DECL_EXTERNAL (v))
error ("automatic variable %qE cannot be %<threadprivate%>", v);
else if (! COMPLETE_TYPE_P (TREE_TYPE (v)))
else if (! COMPLETE_TYPE_P (complete_type (TREE_TYPE (v))))
error ("%<threadprivate%> %qE has incomplete type", v);
else if (TREE_STATIC (v) && TYPE_P (CP_DECL_CONTEXT (v))
&& CP_DECL_CONTEXT (v) != current_class_type)
......
// { dg-require-effective-target tls }
template <class T> struct B
{
T t;
};
class A {
static B<int> b;
#pragma omp threadprivate(b)
};
B<int> A::b;
// { dg-require-alias }
extern "C" void abort();
struct A
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment