This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix bootstrap/40347
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 01 Jul 2009 16:31:57 -0700
- Subject: fix bootstrap/40347
I debugged this problem for sparc, after I fixed PR 40431 and noticed
that libgcc still failed to build; I only accidentally happened to
notice the existing PR (and its duplicate). If this doesn't fix things
for darwin, please let me know.
This problem happened when:
(1) The function has one basic block,
(2) The prologue has frame-related insns, but the epilogue doesn't.
(3) The function ends in a sibcall.
In this situation, we would not re-position the epilogue note, which the
scheduler would have moved to the beginning of the function. The walk
we do in dwarf2out_begin_epilogue would get confused by the fact that a
search forward from the epilogue note would find frame-related insns
(from the prologue), but none of them were for the epilogue.
Fixed by moving the epilogue note to the end of the function if there
are no actual epilogue insns. Note that the actual sibcall isn't
considered an epilogue insn, only the bits we emit to clean up before
the sibcall. Now that I think about it, perhaps that's a mistake...
In any case, this patch is what I tested; I shouldn't be tempted to make
any last-minute changes. :-)
r~
Attachment:
d-40347
Description: Text document