re PR debug/49262 (3-yr-old infinite loop in dwarf2out.c)

PR debug/49262
	* dwarf2out.c (native_encode_initializer): Decrement count in each
	iteration.

From-SVN: r174715
This commit is contained in:
Jakub Jelinek 2011-06-06 19:46:00 +02:00 committed by Jakub Jelinek
parent 04902d4cb5
commit 99a5e049ba
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2011-06-06 Jakub Jelinek <jakub@redhat.com>
PR debug/49262
* dwarf2out.c (native_encode_initializer): Decrement count in each
iteration.
PR debug/49294
* dwarf2out.c (mem_loc_descriptor) <do_shift>: Give up for
non-MODE_INT modes.

View File

@ -18065,7 +18065,7 @@ native_encode_initializer (tree init, unsigned char *array, int size)
{
int count = tree_low_cst (TREE_OPERAND (index, 1), 0)
- tree_low_cst (TREE_OPERAND (index, 0), 0);
while (count > 0)
while (count-- > 0)
{
if (val)
memcpy (array + curpos, array + pos, fieldsize);