This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
- From: "wilson at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2005 00:33:53 -0000
- Subject: [Bug c++/23205] [4.0/4.1 Regression] [C++/unit-at-a-time] stabs debug info omitted for global const variables
- References: <20050802184349.23205.dpatel@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wilson at gcc dot gnu dot org 2005-08-13 00:33 -------
The problem here is the DECL_RTL_SET_P tests in dbxout_global_decl and
dbxout_symbol. Constants have a NULL DECL_RTL, and hence fail this test. This
is OK, because we don't use the DECL_RTL when emitting debug info for a
constant. However, everything else does need to have a valid DECL_RTL. It
looks like deleting the redundant test in dbxout_global_decl and repositioning
the test after the check for constants in dbxout_symbol case VAR_DECL would work.
Writing and testing the patch is left as an exercise for the reader.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23205