From: Richard Henderson Date: Sun, 1 Aug 2004 21:12:20 +0000 (-0700) Subject: expr.c (expand_expr_real_1): Fix crash with variable sized types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbe4d0704fc41055b9c2707ea5b1b9f3b5b8e379;p=gcc.git 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 --- 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))) {