public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13898] New: [tree-ssa] duplicate symbol for local variable turned static
@ 2004-01-28 16:02 bangerth at dealii dot org
  2004-01-28 16:21 ` [Bug middle-end/13898] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2004-01-28 16:02 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2004-01-28 20:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-28 16:02 [Bug c++/13898] New: [tree-ssa] duplicate symbol for local variable turned static bangerth at dealii dot org
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

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