aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-06-30 11:40:38 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-06-30 11:40:38 -0400
commit47297e51f5c84a72bbe4c1bf2542d1c859222d84 (patch)
tree7d2e4dd2b6ac82c39b288980e58f4fa276959ea6 /gcc
parent3048c0c746443b1402bc3b7ebca39c030a3f991c (diff)
downloadgcc-47297e51f5c84a72bbe4c1bf2542d1c859222d84.zip
gcc-47297e51f5c84a72bbe4c1bf2542d1c859222d84.tar.gz
gcc-47297e51f5c84a72bbe4c1bf2542d1c859222d84.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/decl2.c4
-rw-r--r--gcc/testsuite/g++.dg/tls/tls_model1.C8
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cdb37c4..4d9b5a6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,6 +1,9 @@
2015-06-30 Jason Merrill <jason@redhat.com>
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.
(DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
(SET_DECL_GNU_TLS_P): New.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 5032333..0332aa2 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1164,6 +1164,10 @@ is_late_template_attribute (tree attr, tree decl)
if (is_attribute_p ("unused", name))
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. */
if (flag_openmp
&& is_attribute_p ("omp declare simd", name))
diff --git a/gcc/testsuite/g++.dg/tls/tls_model1.C b/gcc/testsuite/g++.dg/tls/tls_model1.C
new file mode 100644
index 0000000..a1520a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/tls_model1.C
@@ -0,0 +1,8 @@
+// { dg-require-effective-target tls }
+// { dg-options "-g" }
+
+template <class T>
+void f()
+{
+ static __thread int i __attribute ((tls_model ("local-exec")));
+}