* dwarf2out.c (tree_add_const_value_attribute): Only handle
VAR_DECL and CONST_DECL.
From-SVN: r139911
+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>
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