This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for purge_addressof_1()
- To: egcs-patches at cygnus dot com
- Subject: Patch for purge_addressof_1()
- From: Graham <grahams at rcp dot co dot uk>
- Date: Sat, 17 Oct 1998 15:27:08 +0100
Hi
I have had a problem building gnat-3.10p with the
egcs-19981012 snapshot.
The problem is the compilation of s-interr.adb fails
due to an access violation in emit-insns_before()
called from purge_addressof_1().
The following patch allows a bootstrap of egcs with
all languages + gnat-3.10p + gnu-pascal to complete.
I think the patch is correct but I don't have a
simple test case to trigger the bug.
A full bootstrap with the patch applied which
included all languages + gnat-3.10p + gnu-pascal
completed.
The use of emit_insn_before matches other uses
of gen_sequence() which call emit_insn_before().
* function.c (purge_addressof_1): replace call to
emit_insns_before() with emit_insn_before().
*** function.c.orig Sat Oct 17 15:15:44 1998
--- function.c Sat Oct 17 15:16:21 1998
*************** purge_addressof_1 (loc, insn, force, sto
*** 2854,2860 ****
insns = gen_sequence ();
end_sequence ();
! emit_insns_before (insns, insn);
return;
}
else if (code == MEM && GET_CODE (XEXP (x, 0)) == ADDRESSOF && !
force)
--- 2854,2860 ----
insns = gen_sequence ();
end_sequence ();
! emit_insn_before (insns, insn);
return;
}
else if (code == MEM && GET_CODE (XEXP (x, 0)) == ADDRESSOF && !
force)
Graham