This is the mail archive of the
mailing list for the GCC project.
Re: S/390 Bootstrap failure due to fixup_eh_region_note
Andrew Pinski <firstname.lastname@example.org> writes:
> On Sep 5, 2005, at 6:39 PM, Richard Henderson wrote:
>> On Mon, Sep 05, 2005 at 02:27:54PM +0200, Andreas Krebbel wrote:
>>> (insn 31 29 49 5 (set (mem/s/j:SI (plus:SI (reg/v/f:SI 47 [ env ])
>>> (const_int 4 [0x4])) [0 <variable>.ex+0 S4 A32])
>>> (mem/f:SI (plus:SI (plus:SI (reg:SI 55)
>>> (reg:SI 56))
>>> (const_int 4092 [0xffc])) [0 S4 A32]))
>> Well, I suppose this is no different from a fp arith insn with a
>> pre-reload memory input that gets reloaded into a register. I
>> suppose there's no invariant that I can enforce.
>> If you look at the version of fixup_abnormal_edges before my patch
>> you'll see a bit that calls find_many_sub_blocks; re-add that hunk
>> and remove the assert in fixup_eh_region_note, then re-test.
> Well find_many_sub_blocks will not find new BBs as the EH_REGION is an
> external throw and not internal throw.
> I think the following patch should fix the problem without any effects.
> It just adds the check to make sure that we have internal throw when
> the trap_count.
> Andreas, could you check this patch?
> Richard, what do you think about this patch?
> It fixes jni.ii for me.
> -- Pinski
> Index: reload1.c
> RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
> retrieving revision 1.481
> diff -u -p -r1.481 reload1.c
> --- reload1.c 1 Sep 2005 23:35:18 -0000 1.481
> +++ reload1.c 6 Sep 2005 03:31:48 -0000
> @@ -3769,6 +3769,7 @@ fixup_eh_region_note (rtx insn, rtx prev
> rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
> unsigned int trap_count;
> rtx i;
> + int internal_throw = can_throw_internal (insn);
> if (note == NULL)
> @@ -3805,7 +3806,7 @@ fixup_eh_region_note (rtx insn, rtx prev
> Fixing all that is not in the cards for gcc 4.2, so for the nonce we
> allow all eh insns to evaporate. */
> - gcc_assert (trap_count <= 1);
> + gcc_assert (!internal_throw || trap_count <= 1);
> /* Reload pseudo-registers into hard regs around each insn as needed.
Won't this break a disabled checking build since internal_throw will become