* bb-reorder.c (copy_bb_p): Sanely handle case where the target has not defined length attributes for its insns. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 6873b4f..0b8d1d9 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -115,6 +115,7 @@ #include "bb-reorder.h" #include "except.h" #include "fibonacci_heap.h" +#include "insn-attr.h" /* The number of rounds. In most cases there will only be 4 rounds, but when partitioning hot and cold basic blocks into separate sections of @@ -1355,6 +1356,9 @@ copy_bb_p (const_basic_block bb, int code_may_grow) int max_size = uncond_jump_length; rtx_insn *insn; + if (!HAVE_ATTR_length) + return false; + if (!bb->frequency) return false; if (EDGE_COUNT (bb->preds) < 2)