aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-05-22 23:06:16 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2002-05-22 23:06:16 +0200
commit45f797836b479856553c333cb0284586ec2d4df6 (patch)
treefebc23802eb42a0e96004dcdcf7449b4d4e974b9 /gcc
parent9f3dbd92d22772fead769678ce0d326a5e74e0f3 (diff)
downloadgcc-45f797836b479856553c333cb0284586ec2d4df6.zip
gcc-45f797836b479856553c333cb0284586ec2d4df6.tar.gz
gcc-45f797836b479856553c333cb0284586ec2d4df6.tar.bz2
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: r53748
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/emit-rtl.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f8ccdae..b2bcff0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-22 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-22 Richard Henderson <rth@redhat.com>
* flow.c (life_analysis): Delete broken reg_label check.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 2e86dff..963946a 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2163,6 +2163,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;