This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c/9530




--On Sunday, February 02, 2003 01:51:25 PM +0100 Eric Botcazou <ebotcazou@libertysurf.fr> wrote:

Hi,

This a regression from gcc 3.0.x on all branches.

The compiler segfaults in fixup_abnormal_edges() because it is trying to
move  and insert an instruction on a non-existant edge. This SET
instruction was  issued by the reg-to-stack pass because the function
baz() is declared to  return a value, but doesn't actually return any.
The problem is that the  call to foo() is turned into a sibling call
(CALL_INSN with /j flag) but the  instruction is issued *after* the
trailing CALL_INSN, thus confusing   fixup_abnormal_edges().

The proposed fix is to instruct the reg-to-stack pass to issue the
missing  SET instruction before the trailing CALL_INSN (like with a
JUMP_INSN).
This patch is OK.

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]