This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
debug/8818: g++ 3.3: missing label definition in debug output
- From: snyder at fnal dot gov
- To: gcc-gnats at gcc dot gnu dot org
- Date: Wed, 4 Dec 2002 23:31:08 -0500
- Subject: debug/8818: g++ 3.3: missing label definition in debug output
- Reply-to: snyder at fnal dot gov
>Number: 8818
>Category: debug
>Synopsis: g++ 3.3: bad assembly code when optimizing (reference to undefined label)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Dec 04 20:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: scott snyder
>Release: 3.3 20021203 (experimental)
>Organization:
>Environment:
System: Linux karma 2.4.19-emp_2419p5a829i #1 Tue Sep 3 17:42:17 EST 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77
>Description:
When the following source is compiled on linux/x86
with the flags `-fPIC -g -O1', the assembly code contains a reference
to the label `.LC0', which is nowhere defined. Removing any of these
three switches makes the problem go away.
$ cc1plus -quiet -fPIC -g -O1 x.cc
$ grep LC0 x.s
.long .LC0
$
This then causes a link error.
It looks like this reference is part of the debug information.
>How-To-Repeat:
---------------------------------------------
struct RefCounter {
RefCounter() ;
};
struct ObjDouble : public RefCounter
{
ObjDouble(double value) : _value(value) { }
double _value;
};
int main() {
double bfield = 2.2;
new ObjDouble(-bfield);
new ObjDouble(-bfield);
return 0;
}
---------------------------------------------
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: