From: Jakub Jelinek Date: Thu, 23 May 2002 08:18:42 +0000 (+0200) Subject: re PR c/6643 (gcc fails in tree check for assignment to variable sized array) X-Git-Tag: releases/gcc-3.1.1~296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33cc911592bea56e79b68e762414aba89407a2f4;p=thirdparty%2Fgcc.git re PR c/6643 (gcc fails in tree check for assignment to variable sized array) PR c/6643 * emit-rtl.c (widen_memory_access): Only call compare_tree_int if DECL_SIZE_UNIT is INTEGER_CST. From-SVN: r53780 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65a5ed22b00c..009d69fb6c50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-05-23 Jakub Jelinek + + PR c/6643 + * emit-rtl.c (widen_memory_access): Only call compare_tree_int + if DECL_SIZE_UNIT is INTEGER_CST. + 2002-05-23 Jakub Jelinek * combine.c (force_to_mode): Use gen_int_mode. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 3b1ebdb1f456..ab93ef3f324b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2169,6 +2169,7 @@ widen_memory_access (memref, mode, offset) /* Similarly for the decl. */ else if (DECL_P (expr) && DECL_SIZE_UNIT (expr) + && TREE_CODE (DECL_SIZE_UNIT (expr)) == INTEGER_CST && compare_tree_int (DECL_SIZE_UNIT (expr), size) >= 0 && (! memoffset || INTVAL (memoffset) >= 0)) break;