On 03/29/2017 12:23 PM, Segher Boessenkool wrote:
If combine has added an unconditional trap there will be a new basic
block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK
as the last_combined_insn, but then it tries to take the DF_INSN_LUID
of that and that dereferences a NULL pointer (since such a note is not
an INSN_P).
This fixes it by not taking non-insns as last_combined_insn.
Bootstrapped and tested on powerpc64-linux {-m32,-m64}.
Segher
2017-03-29 Segher Boessenkool <seg...@kernel.crashing.org>
PR rtl-optimization/80233
* combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
as last_combined_insn. Do not test for BARRIER_P separately.
gcc/testsuite/
PR rtl-optimization/80233
* gcc.c-torture/compile/pr80233.c: New testcase.
No strong opinions on this vs Jakub's patch. I guess yours may walk
more objects on the chain, but in doing so is more likely to find a
useful LAST_COMBINED_INSN. Jakub's stops earlier, but is less likely to
have stopped on something useful.
Your call Segher.
jeff
ps. Never in a million years would I have expected isolation of
division by zero to have exposed as many latent issues as it has. Sigh.