diff options
author | Steven Bosscher <stevenb@suse.de> | 2005-07-27 21:02:55 +0000 |
---|---|---|
committer | Steven Bosscher <stevenb@suse.de> | 2005-07-27 21:02:55 +0000 |
commit | 4dc9ec5cdeffa8bb01fc3f95594f7427314363a2 (patch) | |
tree | ebc825fdd7e02c2724f1fcafb2040f14c3830571 /gcc/varasm.c | |
parent | d30d07215fa16646c999bfce40e08babbf97a309 (diff) |
PR c++/22003
* varasm.c (assemble_start_function): Don't do anything that may
require a CFG if the current function is a thunk.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@102444 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 3ef81468850..88068b5205c 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1274,11 +1274,13 @@ assemble_start_function (tree decl, const char *fnname) unlikely_text_section (); assemble_align (FUNCTION_BOUNDARY); ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label); - if (BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION) + + /* When the function starts with a cold section, we need to explicitly + align the hot section and write out the hot section label. + But if the current function is a thunk, we do not have a CFG. */ + if (!current_function_is_thunk + && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION) { - /* Since the function starts with a cold section, we need to - explicitly align the hot section and write out the hot - section label. */ text_section (); assemble_align (FUNCTION_BOUNDARY); ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); @@ -1361,7 +1363,10 @@ assemble_start_function (tree decl, const char *fnname) ASM_OUTPUT_LABEL (asm_out_file, fnname); #endif /* ASM_DECLARE_FUNCTION_NAME */ - insert_section_boundary_note (); + /* Add NOTE_INSN_SWITCH_TEXT_SECTIONS notes. Don't do this if the current + function is a thunk, because we don't have a CFG in that case. */ + if (!current_function_is_thunk) + insert_section_boundary_note (); } /* Output assembler code associated with defining the size of the |