cfgrtl: Don't crash in rtl_dump_bb if BB_END(bb) is NULL
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 24 Jul 2017 19:47:15 +0000 (21:47 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 24 Jul 2017 19:47:15 +0000 (21:47 +0200)
commit9fcaf0599124d58dbc96fec1f975fa142a8519cf
tree37d16339c1aa6c156c66f5de8ebeec600674ad83
parentd47d34bb22f756731475ea700d165f4d855d712f
cfgrtl: Don't crash in rtl_dump_bb if BB_END(bb) is NULL

Currently rtl_dump_bb crashes if BB_END(bb) is NULL, like it can be
during expand (rtl_dump_bb can be called at any time, by the emergency
dump added recently for example).

This fixes it.

* cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.

From-SVN: r250480
gcc/ChangeLog
gcc/cfgrtl.c