+2019-01-14 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/88263
+ * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
+ as location of the TLS wrapper.
+
2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (cp_finish_decl): Improve error location.
tree type = non_reference (TREE_TYPE (var));
type = build_reference_type (type);
tree fntype = build_function_type (type, void_list_node);
- fn = build_lang_decl (FUNCTION_DECL, sname, fntype);
+
+ fn = build_lang_decl_loc (DECL_SOURCE_LOCATION (var),
+ FUNCTION_DECL, sname, fntype);
SET_DECL_LANGUAGE (fn, lang_c);
TREE_PUBLIC (fn) = TREE_PUBLIC (var);
DECL_ARTIFICIAL (fn) = true;
+2019-01-14 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/88263
+ * g++.dg/gcov/pr88263-2.C: New test.
+
2019-01-14 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88796
--- /dev/null
+// PR gcov-profile/88263
+// { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
+// { dg-do run { target native } }
+
+#include <sstream>
+
+namespace logging {
+ class Logstream {
+ ~Logstream();
+ static thread_local std::ostringstream os_;
+ };
+}
+namespace logging {
+ thread_local std::ostringstream Logstream::os_;
+ Logstream::~Logstream() {
+ os_.clear();
+ }
+}
+
+int main()
+{
+ return 0;
+}
+
+// { dg-final { run-gcov pr88263-2.C } }