public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/106421] New: ICE with computed goto from a nested functon
@ 2022-07-23 10:58 amonakov at gcc dot gnu.org
  2022-07-24 20:19 ` [Bug middle-end/106421] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: amonakov at gcc dot gnu.org @ 2022-07-23 10:58 UTC (permalink / raw)
  To: gcc-bugs

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).

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-07 10:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-23 10:58 [Bug middle-end/106421] New: ICE with computed goto from a nested functon amonakov at gcc dot gnu.org
2022-07-24 20:19 ` [Bug middle-end/106421] " pinskia at gcc dot gnu.org
2022-07-24 20:22 ` [Bug rtl-optimization/106421] [10/11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-07-24 20:23 ` pinskia at gcc dot gnu.org
2022-07-25  7:07 ` marxin at gcc dot gnu.org
2022-07-25  9:27 ` rguenth at gcc dot gnu.org
2022-07-25 14:57 ` rguenth at gcc dot gnu.org
2023-01-10 14:07 ` cvs-commit at gcc dot gnu.org
2023-04-27 13:19 ` [Bug rtl-optimization/106421] [10/11/12 " cvs-commit at gcc dot gnu.org
2023-07-07 10:43 ` [Bug rtl-optimization/106421] [11 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).