* [commit, spu] Fix ICE due to use of uninitialized value in spu.c
@ 2010-08-03 18:07 Ulrich Weigand
0 siblings, 0 replies; only message in thread
From: Ulrich Weigand @ 2010-08-03 18:07 UTC (permalink / raw)
To: gcc-patches
Hello,
recently, we're seeing lots of internal compiler errors on the SPU of the form:
internal compiler error: in check_cfg, at haifa-sched.c:5214
These were caused by spu_emit_branch_hint placing branch hints outside of any
basic block, due to an invalid decision caused by reading random values while
accessing the NOTE_KIND of a non-NOTE insn.
This bug has been in spu.c since forever; no idea why the problem would
suddenly manifest ...
Fixed by the obvious patch below.
Tested on spu-elf; committed to mainline. Will commit to other branches
as well once regtest completes.
Bye,
Ulrich
ChangeLog:
* config/spu/spu.c (spu_emit_branch_hint): Do not access NOTE_KIND of
non-NOTE insns.
Index: gcc/config/spu/spu.c
===================================================================
*** gcc/config/spu/spu.c (revision 162820)
--- gcc/config/spu/spu.c (working copy)
*************** spu_emit_branch_hint (rtx before, rtx br
*** 2330,2336 ****
return;
/* If we have a Basic block note, emit it after the basic block note. */
! if (NOTE_KIND (before) == NOTE_INSN_BASIC_BLOCK)
before = NEXT_INSN (before);
branch_label = gen_label_rtx ();
--- 2330,2336 ----
return;
/* If we have a Basic block note, emit it after the basic block note. */
! if (NOTE_INSN_BASIC_BLOCK_P (before))
before = NEXT_INSN (before);
branch_label = gen_label_rtx ();
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-03 18:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-03 18:07 [commit, spu] Fix ICE due to use of uninitialized value in spu.c Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).