diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-03 16:18:51 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-03 16:18:51 +0000 |
commit | d03a2c79dfbb6958e0e8ee8bf16650f12c1d9b0b (patch) | |
tree | a86f9e91c0181c8efc7912195970d288d3013452 | |
parent | e528aa1f5f21cf2237bb49fd3f60fb148c6eedcf (diff) | |
download | ppe42-gcc-d03a2c79dfbb6958e0e8ee8bf16650f12c1d9b0b.tar.gz ppe42-gcc-d03a2c79dfbb6958e0e8ee8bf16650f12c1d9b0b.zip |
* config/i386/i386.c (ix86_code_end): Set DECL_IGNORED_P on the
pc thunk.
* dwarf2out.c (output_aranges): Skip DECL_IGNORED_P functions.
(dwarf2out_finish): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187105 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 1 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C | 11 |
5 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7eb3b04f55..0068c3393de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-05-03 Jason Merrill <jason@redhat.com> + + * config/i386/i386.c (ix86_code_end): Set DECL_IGNORED_P on the + pc thunk. + * dwarf2out.c (output_aranges): Skip DECL_IGNORED_P functions. + (dwarf2out_finish): Likewise. + 2012-05-03 Martin Jambor <mjambor@suse.cz> * builtins.c (get_object_alignment_1): Return whether we can determine diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 46daee10cd7..ea373475c0c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8619,6 +8619,7 @@ ix86_code_end (void) NULL_TREE, void_type_node); TREE_PUBLIC (decl) = 1; TREE_STATIC (decl) = 1; + DECL_IGNORED_P (decl) = 1; #if TARGET_MACHO if (TARGET_MACHO) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 10a53894f63..10e1ece1891 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8085,6 +8085,8 @@ output_aranges (unsigned long aranges_length) FOR_EACH_VEC_ELT (dw_fde_ref, fde_vec, fde_idx, fde) { + if (DECL_IGNORED_P (fde->decl)) + continue; if (!fde->in_std_section) { dw2_asm_output_addr (DWARF2_ADDR_SIZE, fde->dw_fde_begin, @@ -21897,6 +21899,8 @@ dwarf2out_finish (const char *filename) FOR_EACH_VEC_ELT (dw_fde_ref, fde_vec, fde_idx, fde) { + if (DECL_IGNORED_P (fde->decl)) + continue; if (!fde->in_std_section) add_ranges_by_labels (comp_unit_die (), fde->dw_fde_begin, fde->dw_fde_end, &range_list_added); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1378ff45d9c..79a53d39af9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-05-03 Jason Merrill <jason@redhat.com> + + * g++.dg/debug/dwarf2/thunk1.C: New. + 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53186 diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C b/gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C new file mode 100644 index 00000000000..c34373e2681 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C @@ -0,0 +1,11 @@ +// Test that we don't add the x86 PC thunk to .debug_ranges +// { dg-do compile { target i?86-*-* } } +// { dg-options "-g -fpic" } +// { dg-final { scan-assembler-times "LFB3" 1 } } + +template <class T> void f(T t) { } + +int main() +{ + f(42); +} |