From 08ab58b30f4ae0b42751ce52ac444691e6da2606 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 31 Aug 2008 13:21:28 +0200 Subject: dwarf2out.c (native_encode_initializer): Subtract min_index for non-range array index. * dwarf2out.c (native_encode_initializer): Subtract min_index for non-range array index. Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR. From-SVN: r139825 --- gcc/dwarf2out.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 567fc7a..6a8d34c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11846,7 +11846,7 @@ native_encode_initializer (tree init, unsigned char *array, int size) 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) { @@ -11916,6 +11916,9 @@ native_encode_initializer (tree init, unsigned char *array, int size) 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; } -- cgit v1.1