public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/13898] New: [tree-ssa] duplicate symbol for local variable turned static Date: Wed, 28 Jan 2004 16:02:00 -0000 [thread overview] Message-ID: <20040128160216.13898.bangerth@dealii.org> (raw) This testcase ------------------------ int g(int i) { if (i<1) { const int x[3] = { 1,2,3 }; return x[i]; } else { const int x[3] = { 4,5,6 }; return x[i]; } } ----------------------- now gives the following message on tree-ssa: g/x> /home/bangerth/bin/gcc-tree-ssa/bin/c++ -c x.cc /tmp/cc82Kcxj.s: Assembler messages: /tmp/cc82Kcxj.s:13: Error: symbol `_ZZ1giE1x' is already defined Richard, I guess this is due to your fixes to PR 12814 and PR 13798. Would you mind taking a look? The reason seems to be that if I mark the two variables "x" as static, then they get assigned different names: _ZZ1giE1x and _ZZ1giE1x_0. However, with your recent patch to turn constant arrays into statics, this is not the case: both variables end up having the same name. Thanks Wolfgang -- Summary: [tree-ssa] duplicate symbol for local variable turned static Product: gcc Version: tree-ssa Status: UNCONFIRMED Keywords: wrong-code Severity: critical Priority: P2 Component: c++ AssignedTo: rth at redhat dot com ReportedBy: bangerth at dealii dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13898
next reply other threads:[~2004-01-28 16:02 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-01-28 16:02 bangerth at dealii dot org [this message] 2004-01-28 16:21 ` [Bug middle-end/13898] " pinskia at gcc dot gnu dot org 2004-01-28 20:32 ` cvs-commit at gcc dot gnu dot org 2004-01-28 20:37 ` rth 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=20040128160216.13898.bangerth@dealii.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).