https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80053
--- Comment #13 from Alexander Monakov <amonakov at gcc dot gnu.org> --- Yes, I'm talking only about labels which are potential branch targets, of course after the jumps have been DCE'd it is not really observable where the label points to. Unfortunately after four years I do not remember which line in the RTL machinery made me think RTL is careful about their containing blocks. Okay, so the main motivation appears to be this: the address of a label may be passed down to some callee, and that callee couldn't possibly use it in a goto. So GCC doesn't want to pin down such labels and their containing blocks. This makes sense. Effectively GCC wants to distinguish two kinds of labels, ones that can potentially be used as a goto target in the current function, and those that can't. I am not clear though if each pass is supposed to be careful about computed-goto-like constructs (both plain and asm goto) independently, instead of having can_duplicate_bb_p cfg hook return false for blocks with jumpable+addressable labels (and then just using that hook in the pass)? My testcase forced a miscompilation in the unswitching pass, but other passes duplicate blocks too, and they may be similarly "vulnerable".