From 6c949b675992cde260f0ecfd667e38fcfe8815d8 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Fri, 9 Sep 1994 14:03:24 -0700 Subject: (dbxout_symbol_location): Handle error_mark_node in DECL_INITIAL for C++. From-SVN: r8060 --- gcc/dbxout.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc') 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 -- cgit v1.1