------- Comment #4 from jakub at gcc dot gnu dot org  2009-06-29 23:43 -------
The problem seems to be in based_loc_descriptor:
          /* If drap register is used to align stack, use frame
             pointer + offset to access stack variables.  If stack
             is aligned without drap, use stack pointer + offset to
             access stack variables.  */
          if (crtl->stack_realign_tried
              && cfa.reg == HARD_FRAME_POINTER_REGNUM
              && reg == frame_pointer_rtx)
            {
              int base_reg
                = DWARF_FRAME_REGNUM (cfa.indirect
                                      ? HARD_FRAME_POINTER_REGNUM
                                      : STACK_POINTER_REGNUM);
              return new_reg_loc_descr (base_reg, offset);
            }
I don't see how it can be correct to look at cfa variable content in here, when
scanning through the function is well over and thus cfa contains whatever was
the CFA on the last emitted instruction.  Before epilogue unwinding this
happened to work, because cfa happened to stay at what was in the middle of the
function.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40596

Reply via email to