diff options
author | Martin Liska <mliska@suse.cz> | 2019-01-14 19:40:34 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-01-14 18:40:34 +0000 |
commit | 15f4e33db7e7b0c466db39eccfc693c910459368 (patch) | |
tree | 511164a62cecbad486a63a2e7fadf7134a5ce473 /gcc/cp | |
parent | 97d41887192412188546fe863f9d67197997dbaa (diff) | |
download | gcc-15f4e33db7e7b0c466db39eccfc693c910459368.zip gcc-15f4e33db7e7b0c466db39eccfc693c910459368.tar.gz gcc-15f4e33db7e7b0c466db39eccfc693c910459368.tar.bz2 |
Fix location of tls_wrapper_fn (PR gcov-profile/88263).
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-14 Martin Liska <mliska@suse.cz>
PR gcov-profile/88263
* g++.dg/gcov/pr88263-2.C: New test.
From-SVN: r267921
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 32b2ab1..82412a7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index e4cf4e0..1314ca8 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3445,7 +3445,9 @@ get_tls_wrapper_fn (tree var) 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; |