From a4b6974e6b2a85f7fe9e62e3bce8b6587eaf2a2e Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 16 Jan 2008 12:10:27 +0100 Subject: [PATCH] re PR debug/34249 (FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE) PR debug/34249 * debug.h (dwarf2out_switch_text_section): Move declaration from ... * dwarf2out.c (dwarf2out_switch_text_section): ... here. Make function global. * final.c (final_scan_insn) [NOTE_INSN_SWITCH_TEXT_SECTIONS]: Depending on dwarf2out_do_frame, call dwarf2out_switch_text_section for DWARF2_UNWIND_INFO targets. From-SVN: r131570 --- gcc/ChangeLog | 18 ++++++++++-------- gcc/debug.h | 1 + gcc/dwarf2out.c | 3 +-- gcc/final.c | 8 +++++++- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd099a44055..510e56b1532 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,17 +1,19 @@ +2008-01-16 Uros Bizjak + + PR debug/34249 + * debug.h (dwarf2out_switch_text_section): Move declaration from ... + * dwarf2out.c (dwarf2out_switch_text_section): ... here. Make + function global. + * final.c (final_scan_insn) [NOTE_INSN_SWITCH_TEXT_SECTIONS]: + Depending on dwarf2out_do_frame, call dwarf2out_switch_text_section + for DWARF2_UNWIND_INFO targets. + 2008-01-16 Richard Guenther PR c/34768 * c-typeck.c (common_pointer_type): Do not merge inconsistent type qualifiers for function types. -2008-01-15 Sebastian Pop - - * tree-parloops (gen_parallel_loop): Revert my fix. - -2008-01-15 Sebastian Pop - - * tree-parloops.c (gen_parallel_loop): Fix previous change, declare li. - 2008-01-15 Jerry DeLisle * tree-parloops.c (gen_parallel_loop): Fix ommision of declaration for diff --git a/gcc/debug.h b/gcc/debug.h index 03c80412709..cab1e2603e2 100644 --- a/gcc/debug.h +++ b/gcc/debug.h @@ -160,6 +160,7 @@ extern void dwarf2out_frame_finish (void); /* Decide whether we want to emit frame unwind information for the current translation unit. */ extern int dwarf2out_do_frame (void); +extern void dwarf2out_switch_text_section (void); extern void debug_flush_symbol_queue (void); extern void debug_queue_symbol (tree); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6c7f75a251d..7df2b4626c0 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3659,7 +3659,6 @@ static void dwarf2out_imported_module_or_decl (tree, tree); static void dwarf2out_abstract_function (tree); static void dwarf2out_var_location (rtx); static void dwarf2out_begin_function (tree); -static void dwarf2out_switch_text_section (void); /* The debug hooks structure. */ @@ -7094,7 +7093,7 @@ dwarf2out_note_section_used (void) cold_text_section_used = true; } -static void +void dwarf2out_switch_text_section (void) { dw_fde_ref fde; diff --git a/gcc/final.c b/gcc/final.c index 72edbc05acc..a33da0cfd65 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1777,7 +1777,13 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, case NOTE_INSN_SWITCH_TEXT_SECTIONS: in_cold_section_p = !in_cold_section_p; - (*debug_hooks->switch_text_section) (); +#ifdef DWARF2_UNWIND_INFO + if (dwarf2out_do_frame ()) + dwarf2out_switch_text_section (); + else +#endif + (*debug_hooks->switch_text_section) (); + switch_to_section (current_function_section ()); break;