public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bje at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/26187] New: computed goto code does not produce jumps Date: Thu, 09 Feb 2006 00:29:00 -0000 [thread overview] Message-ID: <bug-26187-602@http.gcc.gnu.org/bugzilla/> (raw) When compiling the test case below, the assembly output shows jmps through eax to the destination pointer, p, for the functions goto0 and goto2 (which contain zero and two expressions that take the address of a label). In function goto1, which only takes the address of one label, there is no jmp instruction generated. The test case originally assigned the label addresses to void * auto variables, but I removed those while simplifying the test. I've been able to reproduce this problem on powerpc-linux-gnu also, so it appears to be target independent. Compile with gcc -S foo.c and examine foo.s. extern int printf (const char *format, ...); int x; void goto0 (void *p) { goto *p; } void goto1 (void *p) { &&label; goto *p; label: x = 0; } void goto2 (void *p) { &&label1; &&label2; goto *p; label1: label2: x = 0; } -- Summary: computed goto code does not produce jumps Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bje at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26187
next reply other threads:[~2006-02-09 0:29 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-09 0:29 bje at gcc dot gnu dot org [this message] 2006-02-09 0:32 ` [Bug middle-end/26187] " pinskia at gcc dot gnu dot org 2006-02-09 0:38 ` bje at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26187-602@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).