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

* [Bug middle-end/13898] [tree-ssa] duplicate symbol for local variable turned static
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-28 16:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |middle-end
   Target Milestone|---                         |tree-ssa


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13898


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

* [Bug middle-end/13898] [tree-ssa] duplicate symbol for local variable turned static
  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
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-28 20:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-28 20:32 -------
Subject: Bug 13898

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	rth@gcc.gnu.org	2004-01-28 20:32:10

Modified files:
	gcc            : ChangeLog.tree-ssa gimplify.c 
Added files:
	gcc/testsuite/g++.dg/opt: static4.C 

Log message:
	PR middle-end/13898
	* gimplify.c (gimplify_init_constructor): Invoke
	lhd_set_decl_assembler_name on the now-static variable.
	* g++.dg/opt/static4.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1131&r2=1.1.2.1132
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.138&r2=1.1.2.139
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/static4.C.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=NONE&r2=1.1.2.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13898


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

* [Bug middle-end/13898] [tree-ssa] duplicate symbol for local variable turned static
  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
  2 siblings, 0 replies; 4+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-01-28 20:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-01-28 20:37 -------
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg03145.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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