[PATCH] Fix PR c/6643
Jakub Jelinek
jakub@redhat.com
Mon May 13 07:25:00 GMT 2002
Hi!
If DECL_SIZE_UNIT is not INTEGER_CST, we'd abort with tree checking or
read e.g. PLUS_EXPR's field as if it were INTEGER_CST.
It is a regression from 3.0 (after all, widen_memory_access was added
in Dec 2001) and similar to
http://gcc.gnu.org/ml/gcc-patches/2001-12/msg02054.html
which just changed the same thing in another place in the same function.
Ok to commit to trunk/3.1.1 (once 3.1 is out)?
2002-05-13 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.
--- gcc/emit-rtl.c.jj Mon Apr 15 14:41:49 2002
+++ gcc/emit-rtl.c Mon May 13 16:15:25 2002
@@ -2161,6 +2161,7 @@ widen_memory_access (memref, mode, offse
/* 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;
Jakub
More information about the Gcc-patches
mailing list