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
This commit is contained in:
Jakub Jelinek 2002-05-23 10:18:42 +02:00 committed by Jakub Jelinek
parent 6320cec904
commit 33cc911592
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2002-05-23 Jakub Jelinek <jakub@redhat.com>
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 <jakub@redhat.com>
* combine.c (force_to_mode): Use gen_int_mode.

View File

@ -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;