https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83219
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 30 Nov 2017, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83219 > > --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > Because new __builtin_unreachable calls are added everywhere in the > optimization pipeline. I'd rather disable the optimizations where we remove > conditionals or switches that branch to __builtin_unreachable if > (sanitize_flags_p (SANITIZE_UNREACHABLE)). > Not sure where exactly that is though. I see: > /* Discard cases that have an unreachable destination block. */ > if (EDGE_COUNT (base_bb->succs) == 0 > && gimple_seq_unreachable_p (bb_seq (base_bb))) > { > edge base_edge = find_edge (gimple_bb (stmt), base_bb); > if (base_edge != NULL) > remove_edge_and_dominated_blocks (base_edge); > i = next_index; > continue; > } > but that is something for switches only, where do we do this for GIMPLE_COND? See callers of assert_unreachable_fallthru_edge_p ()