aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/varasm.c15
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index baca021..a7ac9a4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-27 Steven Bosscher <stevenb@suse.de>
+
+ PR c++/22003
+ * varasm.c (assemble_start_function): Don't do anything that may
+ require a CFG if the current function is a thunk.
+
2005-07-25 Geoffrey Keating <geoffk@apple.com>
* doc/install.texi (Prerequisites): Mention that perl is needed
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3ef8146..88068b5 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