From 703fa2e60966cc14ea7c994ec106957fc3558263 Mon Sep 17 00:00:00 2001 From: Christian Bruel Date: Tue, 14 Apr 2015 14:14:04 +0200 Subject: [PATCH] 15-04-14 Christian Bruel * execute_dwarf2_frame (dw_frame_pointer_regnum): Reinitialize for each function. From-SVN: r222084 --- gcc/ChangeLog | 5 +++++ gcc/dwarf2cfi.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f44fd64533a..71d31b9b729 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-14 Christian Bruel + + * execute_dwarf2_frame (dw_frame_pointer_regnum): Reinitialize for each + function. + 2015-04-14 Marc Glisse PR tree-optimization/63387 diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 27474cba07d..ec2acc961d7 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -2941,7 +2941,6 @@ create_cie_data (void) dw_trace_info cie_trace; dw_stack_pointer_regnum = DWARF_FRAME_REGNUM (STACK_POINTER_REGNUM); - dw_frame_pointer_regnum = DWARF_FRAME_REGNUM (HARD_FRAME_POINTER_REGNUM); memset (&cie_trace, 0, sizeof (cie_trace)); cur_trace = &cie_trace; @@ -2994,6 +2993,9 @@ create_cie_data (void) static unsigned int execute_dwarf2_frame (void) { + /* Different HARD_FRAME_POINTER_REGNUM might coexist in the same file. */ + dw_frame_pointer_regnum = DWARF_FRAME_REGNUM (HARD_FRAME_POINTER_REGNUM); + /* The first time we're called, compute the incoming frame state. */ if (cie_cfi_vec == NULL) create_cie_data (); -- 2.30.2