diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-09-02 21:59:58 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-09-02 21:59:58 +0200 |
commit | dd4bf866adfea8d6f3ebb81c30c55624127415f6 (patch) | |
tree | 91ff9933516c7f0ac2cac200b6ea06dd5ba2a918 /gcc | |
parent | 4aab97f958a6befb29c9cd0edad3057ca2c7977f (diff) | |
download | gcc-dd4bf866adfea8d6f3ebb81c30c55624127415f6.zip gcc-dd4bf866adfea8d6f3ebb81c30c55624127415f6.tar.gz gcc-dd4bf866adfea8d6f3ebb81c30c55624127415f6.tar.bz2 |
dwarf2out.c (tree_add_const_value_attribute): Only handle VAR_DECL and CONST_DECL.
* dwarf2out.c (tree_add_const_value_attribute): Only handle
VAR_DECL and CONST_DECL.
From-SVN: r139911
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d56cf03..0a20825 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-09-02 Jakub Jelinek <jakub@redhat.com> + + * dwarf2out.c (tree_add_const_value_attribute): Only handle + VAR_DECL and CONST_DECL. + 2008-09-02 H.J. Lu <hongjiu.lu@intel.com> Jakub Jelinek <jakub@redhat.com> diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 3e1bd5a6..ab68a00 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11931,10 +11931,14 @@ native_encode_initializer (tree init, unsigned char *array, int size) static void tree_add_const_value_attribute (dw_die_ref var_die, tree decl) { - tree init = DECL_INITIAL (decl); + tree init; tree type = TREE_TYPE (decl); rtx rtl; + if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != CONST_DECL) + return; + + init = DECL_INITIAL (decl); if (TREE_READONLY (decl) && ! TREE_THIS_VOLATILE (decl) && init) /* OK */; else |