non-range array index. Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139825
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-08-31 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2out.c (native_encode_initializer): Subtract min_index for
+ non-range array index. Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR.
+
2008-08-31 Jan Hubicka <jh@suse.cz>
* sparc.h (BRANCH_COST): Fix macro definition.
pos = (tree_low_cst (TREE_OPERAND (index, 0), 0) - min_index)
* fieldsize;
else if (index)
- pos = tree_low_cst (index, 0) * fieldsize;
+ pos = (tree_low_cst (index, 0) - min_index) * fieldsize;
if (val)
{
return true;
}
return false;
+ case VIEW_CONVERT_EXPR:
+ case NON_LVALUE_EXPR:
+ return native_encode_initializer (TREE_OPERAND (init, 0), array, size);
default:
return native_encode_expr (init, array, size) == size;
}