public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* debug/6577: debug info of static const variables leads to undefined references
@ 2002-05-06  4:26 Bruno Haible
  0 siblings, 0 replies; 4+ messages in thread
From: Bruno Haible @ 2002-05-06  4:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6577
>Category:       debug
>Synopsis:       debug info of static const variables leads to undefined references
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Mon May 06 04:26:05 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Bruno Haible
>Release:        3.1 20020423 (prerelease)
>Organization:
GNU hackers
>Environment:
System: Linux linuix 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix=/packages/gnu-snapshot --enable-shared --enable-version-specific-runtime-libs --enable-nls
>Description:

For C++ variables with attributes 'static const' which can be
optimized away, the debug info that is generated leads to undefined
references.

>How-To-Repeat:

$ cat <<\EOF > foo.cc
struct cl_class {};
extern cl_class cl_class_fixnum;
extern cl_class cl_class_bignum;
static const void* const cl_I_classes_dummy[] = { &cl_I_classes_dummy,
  &cl_class_fixnum
};
int main () {}
EOF

$ g++ -O2 foo.cc 
; OK, no error

$ g++ -O2 -g foo.cc 
/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
/tmp/cco4BRgH.o::7: undefined reference to `cl_I_classes_dummy'
/tmp/cco4BRgH.o::7: undefined reference to `cl_class_fixnum'
collect2: ld returned 1 exit status

>Fix:

Omit the debug info for variables which are optimized away.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: debug/6577: debug info of static const variables leads to undefined references
@ 2003-04-23 14:05 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-04-23 14:05 UTC (permalink / raw)
  To: bruno, gcc-bugs, gcc-prs, nobody

Synopsis: debug info of static const variables leads to undefined references

State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Wed Apr 23 14:05:55 2003
State-Changed-Why:
    Apparently fixed

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6577


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

* Re: debug/6577: debug info of static const variables leads to undefined references
@ 2003-04-23 12:56 Bruno Haible
  0 siblings, 0 replies; 4+ messages in thread
From: Bruno Haible @ 2003-04-23 12:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR debug/6577; it has been noted by GNATS.

From: Bruno Haible <bruno@clisp.org>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: debug/6577: debug info of static const variables leads to undefined references
Date: Wed, 23 Apr 2003 14:54:26 +0200 (CEST)

 >     I don't have 3.1 around any more, but can't reproduce this
 >     with 3.2. Can you say whether this is also fixed on your
 >     system with a newer gcc?
 
 It is fixed on my current system with gcc-3.2 and binutils-2.13.90.0.16.
 You can close it.
 
 Bruno


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

* Re: debug/6577: debug info of static const variables leads to undefined references
@ 2003-03-14  2:56 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-03-14  2:56 UTC (permalink / raw)
  To: bruno, gcc-bugs, gcc-prs, nobody

Synopsis: debug info of static const variables leads to undefined references

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Fri Mar 14 02:56:47 2003
State-Changed-Why:
    I don't have 3.1 around any more, but can't reproduce this
    with 3.2. Can you say whether this is also fixed on your
    system with a newer gcc?
    
    Thanks
      Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6577


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

end of thread, other threads:[~2003-04-23 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-06  4:26 debug/6577: debug info of static const variables leads to undefined references Bruno Haible
2003-03-14  2:56 bangerth
2003-04-23 12:56 Bruno Haible
2003-04-23 14:05 bangerth

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