public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: snyder@fnal.gov
To: gcc-gnats@gcc.gnu.org
Subject: debug/8818: g++ 3.3: missing label definition in debug output
Date: Wed, 04 Dec 2002 20:36:00 -0000	[thread overview]
Message-ID: <200212050431.gB54V8210799@localhost.localdomain> (raw)


>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:


                 reply	other threads:[~2002-12-05  4:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200212050431.gB54V8210799@localhost.localdomain \
    --to=snyder@fnal.gov \
    --cc=gcc-gnats@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: link
Be 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).