Commit 08ab58b3 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 1f494b6d
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.
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment