From 99a5e049bad4d20dc10a9934cac65102b6b82977 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 6 Jun 2011 19:46:00 +0200 Subject: 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 --- gcc/dwarf2out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0fa7f91..776066b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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); -- cgit v1.1