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]

Patch for purge_addressof_1()


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


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