Commit 47297e51 by Jason Merrill Committed by Jason Merrill

re PR debug/66653 (ice in gen_type_die_with_usage, at dwarf2out.c:20876)

	PR debug/66653
	* decl2.c (is_late_template_attribute): True for tls_model.

From-SVN: r225193
parent 3048c0c7
2015-06-30 Jason Merrill <jason@redhat.com> 2015-06-30 Jason Merrill <jason@redhat.com>
PR debug/66653 PR debug/66653
* decl2.c (is_late_template_attribute): True for tls_model.
PR debug/66653
* cp-tree.h (CP_DECL_THREAD_LOCAL_P): New. * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
(DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field. (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
(SET_DECL_GNU_TLS_P): New. (SET_DECL_GNU_TLS_P): New.
......
...@@ -1164,6 +1164,10 @@ is_late_template_attribute (tree attr, tree decl) ...@@ -1164,6 +1164,10 @@ is_late_template_attribute (tree attr, tree decl)
if (is_attribute_p ("unused", name)) if (is_attribute_p ("unused", name))
return false; return false;
/* Attribute tls_model wants to modify the symtab. */
if (is_attribute_p ("tls_model", name))
return true;
/* #pragma omp declare simd attribute needs to be always deferred. */ /* #pragma omp declare simd attribute needs to be always deferred. */
if (flag_openmp if (flag_openmp
&& is_attribute_p ("omp declare simd", name)) && is_attribute_p ("omp declare simd", name))
......
// { dg-require-effective-target tls }
// { dg-options "-g" }
template <class T>
void f()
{
static __thread int i __attribute ((tls_model ("local-exec")));
}
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