From dbe4d0704fc41055b9c2707ea5b1b9f3b5b8e379 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 1 Aug 2004 14:12:20 -0700 Subject: [PATCH] expr.c (expand_expr_real_1): Fix crash with variable sized types. * expr.c (expand_expr_real_1) : Fix crash with variable sized types. From-SVN: r85412 --- gcc/ChangeLog | 5 +++++ gcc/expr.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 118e96a90e7..24af3471a4a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-08-01 Richard Henderson + + * expr.c (expand_expr_real_1) : Fix crash with + variable sized types. + 2004-08-01 Richard Sandiford * doc/invoke.texi: In the MIPS options section, remove the passage diff --git a/gcc/expr.c b/gcc/expr.c index f2faae301a6..884bbe4a5fb 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6977,8 +6977,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, size of the type isn't the same size as the bitfield, we must use bitfield operations. */ || (bitsize >= 0 - && (TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) - == INTEGER_CST) + && TYPE_SIZE (TREE_TYPE (exp)) + && TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) == INTEGER_CST && 0 != compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)), bitsize))) { -- 2.30.2