aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2014-01-15 13:41:03 -0800
committerRichard Henderson <rth@gcc.gnu.org>2014-01-15 13:41:03 -0800
commitaf6e846774d7ed8841ce700b28dc89b02291280d (patch)
treed1d3786b095e17f4905aa5aaa2fd19078f41d1a5 /gcc/ira.c
parent4583fada2d37b41c5681b9f381f9251c1a5356dc (diff)
downloadgcc-af6e846774d7ed8841ce700b28dc89b02291280d.zip
gcc-af6e846774d7ed8841ce700b28dc89b02291280d.tar.gz
gcc-af6e846774d7ed8841ce700b28dc89b02291280d.tar.bz2
re PR debug/54694 (internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:2387)
PR debug/54694 Diagnose frame_pointer_required vs fixed hfp From-SVN: r206647
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index 41e05f4..ee6010a 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -5532,6 +5532,18 @@ do_reload (void)
if (need_dce && optimize)
run_fast_dce ();
+ /* Diagnose uses of the hard frame pointer when it is used as a global
+ register. Often we can get away with letting the user appropriate
+ the frame pointer, but we should let them know when code generation
+ makes that impossible. */
+ if (global_regs[HARD_FRAME_POINTER_REGNUM] && frame_pointer_needed)
+ {
+ tree decl = global_regs_decl[HARD_FRAME_POINTER_REGNUM];
+ error_at (DECL_SOURCE_LOCATION (current_function_decl),
+ "frame pointer required, but reserved");
+ inform (DECL_SOURCE_LOCATION (decl), "for %qD", decl);
+ }
+
timevar_pop (TV_IRA);
}