On Wed, 2014-08-20 at 06:19 -0400, David Malcolm wrote: > On Wed, 2014-08-20 at 10:20 +0200, Andreas Schwab wrote: > > David Malcolm <dmalc...@redhat.com> writes: > > > > > @@ -4083,7 +4083,7 @@ cfg_layout_can_duplicate_bb_p (const_basic_block bb) > > > return true; > > > } > > > > > > -rtx > > > +rtx_insn * > > > duplicate_insn_chain (rtx from, rtx to) > > > { > > > rtx insn, next, copy; > > > @@ -4169,7 +4169,7 @@ duplicate_insn_chain (rtx from, rtx to) > > > } > > > insn = NEXT_INSN (last); > > > delete_insn (last); > > > - return insn; > > > + return as_a <rtx_insn *> (insn); > > > > This is wrong, insn may be NULL. > > Thanks; and indeed, this broke the bootstrap, as noted in: > https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01964.html > > Fixed in r214207: > https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01971.html
...and this has subsequently been filed as PR62203 (retitling accordingly). > Sorry. I'm trying to figure out why this didn't break during my > testing. Patch #60 of the original series contained an equivalent as_a > -> as_a_nullable hunk: > https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00708.html > - albeit with a misleading ChangeLog entry (I'm assuming I messed that > up during a rebase) - but this hadn't been applied yet. I just reran a bootstrap with patches 4-35 containing the unsafe as_a cast from #35, on top of r213973 (from 2014-08-14), and somehow it successfully bootstrapped and regression tested on x86_64-unknown-linux-gnu (Fedora 20). r213973 has been the baseline I've been testing and patching against. So presumably something changed *since* r213973 to make the bug in patch #35 show itself when applied on a more recent trunk (I was able to reproduce the bug on the same machine, with the same configure flags). Bother. I'll rebase against a more recent trunk and retest accordingly for the followup patches. I'll also take another look at the patches that add as_a<> (as opposed to safe_as_a<>) [Does this make a case for adding the safety check to the is_a_helper functions, and dropping safe_as_a variant altogether?] Sorry about this Dave