]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/6643 (gcc fails in tree check for assignment to variable sized array)
authorJakub Jelinek <jakub@redhat.com>
Thu, 23 May 2002 08:18:42 +0000 (10:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 23 May 2002 08:18:42 +0000 (10:18 +0200)
PR c/6643
* emit-rtl.c (widen_memory_access): Only call compare_tree_int
if DECL_SIZE_UNIT is INTEGER_CST.

From-SVN: r53780

gcc/ChangeLog
gcc/emit-rtl.c

index 65a5ed22b00ce291fda54c7f6299b47242fa3ef2..009d69fb6c5092f72f645af0c59faa8ec1d21b33 100644 (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.
index 3b1ebdb1f45632cdd48e9bbd47e30bbb06712829..ab93ef3f324b9b23979a36faeabebc273a6855af 100644 (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;