aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-04-26 20:44:59 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-04-26 20:44:59 +0200
commita9548ddfe584e4253d3afcf07b5a2cbb5b68a896 (patch)
tree389fce94fdeefafd175cbeb3d0ca842d67200c62 /gcc/dbxout.c
parent10555d08b4bee4c92649200866ce0ee9e8d9af5d (diff)
downloadgcc-a9548ddfe584e4253d3afcf07b5a2cbb5b68a896.zip
gcc-a9548ddfe584e4253d3afcf07b5a2cbb5b68a896.tar.gz
gcc-a9548ddfe584e4253d3afcf07b5a2cbb5b68a896.tar.bz2
tree.h (DECL_BY_REFERENCE): Note that it is also valid for !TREE_STATIC VAR_DECLs.
* tree.h (DECL_BY_REFERENCE): Note that it is also valid for !TREE_STATIC VAR_DECLs. * dwarf2out.c (loc_by_reference, gen_decl_die): Handle DECL_BY_REFERENCE on !TREE_STATIC VAR_DECLs. (gen_variable_die): Likewise. Don't look at TREE_PRIVATE if DECL_BY_REFERENCE is valid. * dbxout.c (DECL_ACCESSIBILITY_CHAR): Don't look at TREE_PRIVATE for PARM_DECLs, RESULT_DECLs or !TREE_STATIC VAR_DECLs. * tree-nested.c (get_nonlocal_debug_decl, get_local_debug_decl): Copy DECL_BY_REFERENCE. (struct nesting_copy_body_data): New type. (nesting_copy_decl): New function. (finalize_nesting_tree_1): Remap types of debug_var_chain variables, if they have variable length. From-SVN: r146808
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index dd05076..077fc1a 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1398,7 +1398,9 @@ dbxout_type_index (tree type)
/* Used in several places: evaluates to '0' for a private decl,
'1' for a protected decl, '2' for a public decl. */
#define DECL_ACCESSIBILITY_CHAR(DECL) \
-(TREE_PRIVATE (DECL) ? '0' : TREE_PROTECTED (DECL) ? '1' : '2')
+((TREE_CODE (DECL) != PARM_DECL && TREE_CODE (DECL) != RESULT_DECL \
+ && (TREE_CODE (DECL) != VAR_DECL || TREE_STATIC (DECL)) \
+ && TREE_PRIVATE (DECL)) ? '0' : TREE_PROTECTED (DECL) ? '1' : '2')
/* Subroutine of `dbxout_type'. Output the type fields of TYPE.
This must be a separate function because anonymous unions require