public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/20117] New: [4.0.0 Regression] duplicated labels in PIC Date: Mon, 21 Feb 2005 18:23:00 -0000 [thread overview] Message-ID: <20050221022150.20117.kkojima@gcc.gnu.org> (raw) 4.0.0 generates duplicated labels on sh4-unknown-linux-gnu with -fPIC -O2 for the code below: void bar (void); int f(int i, int j) { static void *a[5] = {&&b,&&c,&&d,&&e,&&f}; if (i >=5) i = 0; if (i<=0)i=5; goto *a[i]; e: i++; if (i >=5) i = 0; if (i<=0)i=5; j++; goto *a[i]; f: i--; if (i >=5) i = 0; if (i<=0)i=5; j--; goto *a[i]; b: i+=2; if (i >=5) i = 0; if (i<=0)i=5; goto *a[i]; c: i*=2; if (i >=5) i = 0; if (i<=0)i=5; bar (); goto *a[i]; d:; } which is a slightly modified testcase in PR 15242. SH uses the unique label for PIC call insn and it's noncopyable. duplicate_computed_gotos which was introduced to solve PR 15242 copies the block including call insn for bar and produces duplicated labels. I'm proposing a patch http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00924.html to avoid this. -- Summary: [4.0.0 Regression] duplicated labels in PIC Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kkojima at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gn GCC host triplet: i686-pc-linux-gnu GCC target triplet: sh4-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20117
next reply other threads:[~2005-02-21 2:21 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-02-21 18:23 kkojima at gcc dot gnu dot org [this message] 2005-02-21 18:45 ` [Bug target/20117] " kkojima at gcc dot gnu dot org 2005-02-22 0:48 ` [Bug rtl-optimization/20117] [4.0 " pinskia at gcc dot gnu dot org 2005-02-25 16:20 ` cvs-commit at gcc dot gnu dot org 2005-02-25 17:04 ` pinskia 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=20050221022150.20117.kkojima@gcc.gnu.org \ --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).