summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-14 13:07:05 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-14 13:07:05 +0000
commitb8a89e7e81e9f94852d36724878f1ae328a5ba85 (patch)
tree9cc76fb425b71d0e50ff805535ba86260f5589ba /gcc/cfgexpand.c
parent4b8163037ef0d87ff8b70166abcb47c16b47b697 (diff)
downloadgcc-b8a89e7e81e9f94852d36724878f1ae328a5ba85.tar.gz
PR middle-end/46667
* varasm.c (assemble_start_function): Do not call resolve_unique_section. * cfgexpand.c (gimple_expand_cfg): Resolve it here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167795 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 0ab06ead9f2..6cc5d01912f 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -3951,6 +3951,10 @@ gimple_expand_cfg (void)
crtl->preferred_stack_boundary = STACK_BOUNDARY;
cfun->cfg->max_jumptable_ents = 0;
+ /* Resovle the function section. Some targets, like ARM EABI rely on knowledge
+ of the function section at exapnsion time to predict distance of calls. */
+ resolve_unique_section (current_function_decl, 0, flag_function_sections);
+
/* Expand the variables recorded during gimple lowering. */
timevar_push (TV_VAR_EXPAND);
start_sequence ();