public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output
@ 2004-08-15 23:30 carlo at gcc dot gnu dot org
2004-08-15 23:33 ` [Bug middle-end/17042] " carlo at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: carlo at gcc dot gnu dot org @ 2004-08-15 23:30 UTC (permalink / raw)
To: gcc-bugs
I cannot manage to write a small test case that still shows this bug.
However - it must be a bug because this code compiles with all other
compiler versions and did compile fine with CVS of May 2004.
To reproduce compile the attached libcw_app.ii:
[...]
/usr/src/GNU/install/bin/../libexec/gcc/i686-redhat-linux/3.5.0/cc1plus
-fpreprocessed libcw_app.ii -quiet -dumpbase libcw_app.cc -mtune=pentiumpro
-auxbase-strip .libs/libcw_app.o -g -Wall -Woverloaded-virtual -Wundef
-Wpointer-arith -Wwrite-strings -Werror -Winline -version -fPIC -o libcw_app.s
GNU C++ version 3.5.0 20040813 (experimental) (i686-redhat-linux)
compiled by GNU C version 3.5.0 20040813 (experimental).
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113141
as -V -Qy -o .libs/libcw_app.o libcw_app.s
GNU assembler version 2.14.90.0.8 (i386-redhat-linux) using BFD version
2.14.90.0.8 20040114
libcw_app.s: Assembler messages:
libcw_app.s:191: Error: symbol `__dso_handle' is already defined
The problem is that `__dso_handle' is emitted twice in libcw_app.s,
while it should only be emitted once.
--
Summary: [regression 3.5] Duplicated symbol in assembly output
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carlo at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-redhat-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/17042] [regression 3.5] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
@ 2004-08-15 23:33 ` carlo at gcc dot gnu dot org
2004-08-15 23:36 ` [Bug c++/17042] [3.5 regression] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: carlo at gcc dot gnu dot org @ 2004-08-15 23:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From carlo at gcc dot gnu dot org 2004-08-15 23:33 -------
Created an attachment (id=6934)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6934&action=view)
bzip2 compressed preprocessed source code
The .ii file is compressed because it is larger than 1 Mbyte.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [3.5 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
2004-08-15 23:33 ` [Bug middle-end/17042] " carlo at gcc dot gnu dot org
@ 2004-08-15 23:36 ` pinskia at gcc dot gnu dot org
2004-08-15 23:44 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-15 23:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c++
Summary|[regression 3.5] Duplicated |[3.5 regression] Duplicated
|symbol in assembly output |symbol in assembly output
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [3.5 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
2004-08-15 23:33 ` [Bug middle-end/17042] " carlo at gcc dot gnu dot org
2004-08-15 23:36 ` [Bug c++/17042] [3.5 regression] " pinskia at gcc dot gnu dot org
@ 2004-08-15 23:44 ` pinskia at gcc dot gnu dot org
2004-08-16 17:34 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-15 23:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-15 23:44 -------
Reduced to:
struct A
{ A(); ~A(); };
A a;
extern "C" { void* __dso_handle __attribute__ ((__weak__)); }
void f()
{ __dso_handle = 0; }
Note the code it self is not right for what you want to do, instead it should be:
extern void* __dso_handle __attribute__ ((__weak__));
But the C++ front-end should be picking up the user variable and not making a new one.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-08-15 23:44:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [3.5 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-08-15 23:44 ` pinskia at gcc dot gnu dot org
@ 2004-08-16 17:34 ` pinskia at gcc dot gnu dot org
2004-08-17 6:25 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-16 17:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-16 17:34 -------
Using Phil's regression hunter (the hard way)
between 2004-07-29 and 2004-07-30 is when this broke.
Caused most likely by:
2004-07-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
(lang_decl_flags): Narrow the width of "languages". Add
repo_available_p.
(DECL_NEEDED_P): Remove.
(FOR_EACH_CLONE): New macro.
(DECL_REPO_AVAILABLE_P): Likewise.
(DECL_TINFO_P): Likewise.
(set_linkage_according_to_type): Declare.
(import_export_vtable): Remove.
(import_export_tinfo): Likewise.
....
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [3.5 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-08-16 17:34 ` pinskia at gcc dot gnu dot org
@ 2004-08-17 6:25 ` mmitchel at gcc dot gnu dot org
2004-08-17 7:20 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-17 6:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-17 06:25 -------
First, I am not sure that I agree that this is a bug: __dso_handle is a magic
variable outside the user's namespace.
Second, I cannot reproduce this bug with today's compiler on i686-pc-linux-gnu
using the reduced test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [3.5 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-08-17 6:25 ` mmitchel at gcc dot gnu dot org
@ 2004-08-17 7:20 ` pinskia at gcc dot gnu dot org
2004-10-15 5:22 ` [Bug c++/17042] [4.0 " mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-17 7:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-17 07:19 -------
I still can reproduce it on the mainline (note that you have to have --enable-__cxa_atexit enabled):
.type __dso_handle, @object
.size __dso_handle, 4
__dso_handle:
.zero 4
.weak __dso_handle
.align 4
.type __dso_handle, @object
.size __dso_handle, 4
__dso_handle:
.zero 4
Still this is a QOI issue, if we do anything we should warn or error out on this situation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [4.0 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-08-17 7:20 ` pinskia at gcc dot gnu dot org
@ 2004-10-15 5:22 ` mmitchel at gcc dot gnu dot org
2004-10-15 21:12 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-10-15 5:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [4.0 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-10-15 5:22 ` [Bug c++/17042] [4.0 " mmitchel at gcc dot gnu dot org
@ 2004-10-15 21:12 ` cvs-commit at gcc dot gnu dot org
2004-10-15 21:15 ` mmitchel at gcc dot gnu dot org
2004-10-15 21:18 ` cvs-commit at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-15 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-15 21:11 -------
Subject: Bug 17042
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-10-15 21:11:50
Modified files:
gcc/cp : ChangeLog decl.c parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: dso_handle1.C
gcc/testsuite/g++.dg/parse: pragma1.C typedef6.C
Log message:
PR c++/17042
* decl.c (declare_global_var): Use the return value from pushdecl.
PR c++/14667
* parser.c (cp_parser_simple_declaration): Do not diagnose invalid
type names if we have already found a valid type.
(cp_parser_member_declaration): Likewise.
PR c++/17852
* parser.c (cp_parser_member_specification_opt): Handle
CPP_PRAGMA.
PR c++/17042
* g++.dg/init/dso_handle1.C: New test.
PR c++/17852
* g++.dg/parse/pragma1.C: New test.
PR c++/14667
* g++.dg/parse/typedef6.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4437&r2=1.4438
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1315&r2=1.1316
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.263&r2=1.264
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4459&r2=1.4460
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/dso_handle1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/pragma1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/typedef6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [4.0 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-15 21:12 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-15 21:15 ` mmitchel at gcc dot gnu dot org
2004-10-15 21:18 ` cvs-commit at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-10-15 21:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-10-15 21:15 -------
Fixed in GCC 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/17042] [4.0 regression] Duplicated symbol in assembly output
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-10-15 21:15 ` mmitchel at gcc dot gnu dot org
@ 2004-10-15 21:18 ` cvs-commit at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-15 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-15 21:18 -------
Subject: Bug 17042
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-10-15 21:18:08
Modified files:
gcc/cp : ChangeLog
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/parse: pragma1.C
Log message:
PR c++/17042
* decl.c (declare_global_var): Use the return value from pushdecl.
PR c++/14667
* parser.c (cp_parser_simple_declaration): Do not diagnose invalid
type names if we have already found a valid type.
(cp_parser_member_declaration): Likewise.
PR c++/17852
* parser.c (cp_parser_member_specification_opt): Handle
CPP_PRAGMA.
PR c++/17042
* g++.dg/init/dso_handle1.C: New test.
PR c++/17852
* g++.dg/parse/pragma1.C: New test.
PR c++/14667
* g++.dg/parse/typedef6.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4438&r2=1.4439
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4460&r2=1.4461
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/pragma1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17042
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-10-15 21:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 23:30 [Bug middle-end/17042] New: [regression 3.5] Duplicated symbol in assembly output carlo at gcc dot gnu dot org
2004-08-15 23:33 ` [Bug middle-end/17042] " carlo at gcc dot gnu dot org
2004-08-15 23:36 ` [Bug c++/17042] [3.5 regression] " pinskia at gcc dot gnu dot org
2004-08-15 23:44 ` pinskia at gcc dot gnu dot org
2004-08-16 17:34 ` pinskia at gcc dot gnu dot org
2004-08-17 6:25 ` mmitchel at gcc dot gnu dot org
2004-08-17 7:20 ` pinskia at gcc dot gnu dot org
2004-10-15 5:22 ` [Bug c++/17042] [4.0 " mmitchel at gcc dot gnu dot org
2004-10-15 21:12 ` cvs-commit at gcc dot gnu dot org
2004-10-15 21:15 ` mmitchel at gcc dot gnu dot org
2004-10-15 21:18 ` cvs-commit 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).