This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Abort in redirect_edge_and_branch on vax at line 866
- From: Jan Hubicka <jh at suse dot cz>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-bugs at gcc dot gnu dot org, jh at suse dot cz, rth at redhat dot com
- Date: Wed, 9 Jan 2002 10:39:12 +0100
- Subject: Re: Abort in redirect_edge_and_branch on vax at line 866
- References: <200201082051.g08KpnZ4006601@hiauly1.hia.nrc.ca>
> I get an abort in redirect_edge_and_branch on vax-dec-ultrix4.3 compiling
> execute/950704-1.c at -O3. The code is:
>
> /* If the insn doesn't go where we think, we're confused. */
> if (JUMP_LABEL (insn) != old_label)
> abort ();
>
> The insn causing the problem looks like this in 950704-1.c.09.addressof:
>
> (jump_insn 496 495 1004 (set (pc)
> (if_then_else (lt (cc0)
> (const_int 0 [0x0]))
> (label_ref 518)
> (pc))) 116 {blt} (nil)
> (nil))
>
> After 950704-1.c.10.gcse, we have
>
> (note 1001 494 496 [bb 21] NOTE_INSN_BASIC_BLOCK)
>
> (jump_insn 496 1001 1004 (set (pc)
> (pc)) 116 {blt} (nil)
> (nil))
You really should remove this instruction from the machine description.
The overall scheme handling this in gcc is to allow existence of this
in some cases, but remove it via delete_noop_moves that should be done
just afterwards, before cleanup_cfg comes into role.
I guess removing the pattern is just enought to fix the failure,
but it would be nice to
1) make gcse handle such noops
2) run delete_noop_moves/delete_trivially_dead_insns afterwards. I will
dig into this issue.
>
> Is the problem that the edge wasn't updated when the label was removed
> from insn 496? Or, can we just ignore old_label when there is no
> JUMP_LABEL in the insn. Or, should the gcse pass have completely
> removed bb 21?
It should've done the delete_trivially_dead_insns in such case.
It should've updated the JUMP_LABEL to NULL and delte the edge too,
but this can be done by purge_dead_edges in case insns has been killed.
Honza
>
> Dave
> --
> J. David Anglin dave.anglin@nrc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6605)