https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106421
Bug ID: 106421 Summary: ICE with computed goto from a nested functon Product: gcc Version: unknown Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: amonakov at gcc dot gnu.org Target Milestone: --- int main(int argc, char **argv) { __label__ loop, end; void jmp(int c) { goto *(c ? &&loop : &&end); } loop: jmp(argc < 0); end:{} } makes gcc -O2 segfault in find_edge during RTL cprop. The documentation might want to specify that goto from a nested function to a containing function cannot be a 'computed goto' (must refer to the target label directly by name).