diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-09-09 14:03:24 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-09-09 14:03:24 -0700 |
commit | 6c949b675992cde260f0ecfd667e38fcfe8815d8 (patch) | |
tree | ef114d619f5d5208eb099b978aeb9a97c8fbe5c0 /gcc | |
parent | ad03007a2b910916428de912e9162272e25aa617 (diff) | |
download | gcc-6c949b675992cde260f0ecfd667e38fcfe8815d8.zip gcc-6c949b675992cde260f0ecfd667e38fcfe8815d8.tar.gz gcc-6c949b675992cde260f0ecfd667e38fcfe8815d8.tar.bz2 |
(dbxout_symbol_location): Handle error_mark_node in
DECL_INITIAL for C++.
From-SVN: r8060
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/dbxout.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index d34497d..f09d52c 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1843,7 +1843,13 @@ dbxout_symbol_location (decl, type, suffix, home) letter = decl_function_context (decl) ? 'V' : 'S'; - if (!DECL_INITIAL (decl)) + /* This should be the same condition as in assemble_variable, but + we don't have access to dont_output_data here. So, instead, + we rely on the fact that error_mark_node initializers always + end up in bss for C++ and never end up in bss for C. */ + if (DECL_INITIAL (decl) == 0 + || (!strcmp (lang_identify (), "cplusplus") + && DECL_INITIAL (decl) == error_mark_node)) current_sym_code = N_LCSYM; else if (DECL_IN_TEXT_SECTION (decl)) /* This is not quite right, but it's the closest |