[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-11-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek  ---
Is this now fixed?


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-11-18 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Eric Botcazou  ---
Sure.


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread dmalcolm at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

Dave Malcolm  changed:

   What|Removed |Added

 CC||dmalcolm at redhat dot com

--- Comment #1 from Dave Malcolm  ---
The crash in find_dead_or_set_registers is the one discussed in:
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02619.html
and I introduced it in r214693 (aka patch #225)

The crash in follow_jumps is similar to it, and occurs here:
new_thread = follow_jumps (JUMP_LABEL_AS_INSN (new_thread), insn,
   &crossing);
where JUMP_LABEL_AS_INSN erroneously tries to coerce JUMP_LABEL (new_thread) to
be an insn, but it's a RETURN.  I introduced this one in r214684 (aka patch
#218)

Sorry; am working on a fix.


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #1 from Dave Malcolm  ---
> The crash in find_dead_or_set_registers is the one discussed in:
> https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02619.html
> and I introduced it in r214693 (aka patch #225)
>
> The crash in follow_jumps is similar to it, and occurs here:
> new_thread = follow_jumps (JUMP_LABEL_AS_INSN (new_thread), insn,
>&crossing);
> where JUMP_LABEL_AS_INSN erroneously tries to coerce JUMP_LABEL (new_thread) 
> to
> be an insn, but it's a RETURN.  I introduced this one in r214684 (aka patch
> #218)

I see, thanks.  I completely lost track what's happening in this patch
series...

> Sorry; am working on a fix.

Great, thanks.

Rainer


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread dmalcolm at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #3 from Dave Malcolm  ---
Do you have preprocessed source handy for the reorg.c crash?


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread dmalcolm at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #4 from Dave Malcolm  ---
(In reply to Dave Malcolm from comment #3)
> Do you have preprocessed source handy for the reorg.c crash?

No need; I've reproduced it locally now.


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread dmalcolm at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #5 from Dave Malcolm  ---
Created attachment 33416
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33416&action=edit
Candidate patch.  Bootstrapped on x86_64; seems to work on stage1 cris and
sparc


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-29 Thread sje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #6 from Steve Ellcey  ---
(In reply to Dave Malcolm from comment #5)
> Created attachment 33416 [details]
> Candidate patch.  Bootstrapped on x86_64; seems to work on stage1 cris and
> sparc

This patch fixed my MIPS build.  I am running the testsuite now and it 
looks good so far.


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-30 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #7 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #5 from Dave Malcolm  ---
> Created attachment 33416
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33416&action=edit
> Candidate patch.  Bootstrapped on x86_64; seems to work on stage1 cris and
> sparc

With this patch, sparc-sun-solaris2.11 bootstrap completed
successfully.  Compared to the last one of a week ago, there are two
testsuite regressions, but I assume they are unrelated:

FAIL: gcc.dg/20111227-2.c scan-rtl-dump ree "Elimination opportunities = 3
realized = 3"
FAIL: gcc.dg/vect/vect-33.c scan-tree-dump-times vect "Alignment of access
forced using versioning" 1

Rainer


[Bug bootstrap/62304] [5 regression] ICE in follow_jumps, find_dead_or_set_registers

2014-08-30 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62304

--- Comment #8 from dmalcolm at gcc dot gnu.org ---
Author: dmalcolm
Date: Sat Aug 30 14:34:02 2014
New Revision: 214752

URL: https://gcc.gnu.org/viewcvs?rev=214752&root=gcc&view=rev
Log:
PR bootstrap/62304

* gcc/reorg.c (skip_consecutive_labels): Convert return type and
param back from rtx_insn * to rtx.  Rename param from "label" to
"label_or_return", reintroducing "label" as an rtx_insn * after
we've ensured it's not a RETURN.
(first_active_target_insn): Likewise for return type and param;
add a checked cast to rtx_insn * once we've ensured "insn" is not
a RETURN.
(steal_delay_list_from_target): Convert param "pnew_thread" back
from rtx_insn ** to rtx *.  Replace use of JUMP_LABEL_AS_INSN
with JUMP_LABEL.
(own_thread_p): Convert param "thread" back from an rtx_insn * to
an rtx.  Introduce local rtx_insn * "thread_insn" with a checked
cast once we've established we're not dealing with a RETURN,
renaming subsequent uses of "thread" to "thread_insn".
(fill_simple_delay_slots): Convert uses of JUMP_LABEL_AS_INSN back
to JUMP_LABEL.
(follow_jumps): Convert return type and param "label" from
rtx_insn * back to rtx.  Move initialization of "value" to after
the handling for ANY_RETURN_P, adding a checked cast there to
rtx_insn *.  Convert local rtx_insn * "this_label" to an rtx and
rename to "this_label_or_return", reintroducing "this_label" as
an rtx_insn * once we've handled the case where it could be an
ANY_RETURN_P.
(fill_slots_from_thread): Rename param "thread" to
"thread_or_return", converting from an rtx_insn * back to an rtx.
Reintroduce name "thread" as an rtx_insn * local with a checked
cast once we've handled the case of it being an ANY_RETURN_P.
Convert local "new_thread" from an rtx_insn * back to an rtx.
Add a checked cast when assigning to "trial" from "new_thread".
Convert use of JUMP_LABEL_AS_INSN back to JUMP_LABEL.  Add a
checked cast to rtx_insn * from "new_thread" when invoking
get_label_before.
(fill_eager_delay_slots): Convert locals "target_label",
"insn_at_target" from rtx_insn * back to rtx.
Convert uses of JUMP_LABEL_AS_INSN back to JUMP_LABEL.
(relax_delay_slots): Convert locals "trial", "target_label" from
rtx_insn * back to rtx.  Convert uses of JUMP_LABEL_AS_INSN back
to JUMP_LABEL.  Add a checked cast to rtx_insn * on "trial" when
invoking update_block.
(dbr_schedule): Convert use of JUMP_LABEL_AS_INSN back to
JUMP_LABEL; this removes all JUMP_LABEL_AS_INSN from reorg.c.

* resource.h (mark_target_live_regs): Undo erroneous conversion
of second param of r214693, converting it back from rtx_insn * to
rtx, since it could be a RETURN.

* resource.c (find_dead_or_set_registers): Similarly, convert
param "jump_target" back from an rtx_insn ** to an rtx *, as we
could be writing back a RETURN.  Rename local rtx_insn * "next" to
"next_insn", and introduce "lab_or_return" as a local rtx,
handling the case where JUMP_LABEL (this_jump_insn) is a RETURN.
(mark_target_live_regs): Undo erroneous conversion
of second param of r214693, converting it back from rtx_insn * to
rtx, since it could be a RETURN.  Rename it from "target" to
"target_maybe_return", reintroducing the name "target" as a local
rtx_insn * with a checked cast, after we've handled the case of
ANY_RETURN_P.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/reorg.c
trunk/gcc/resource.c
trunk/gcc/resource.h