OSDN Git Service

* expr.c (expand_expr_real_1) <normal_inner_ref>: Fix crash with
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Aug 2004 21:12:20 +0000 (21:12 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Aug 2004 21:12:20 +0000 (21:12 +0000)
        variable sized types.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85412 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expr.c

index 118e96a..24af347 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-01  Richard Henderson  <rth@redhat.com>
+
+       * expr.c (expand_expr_real_1) <normal_inner_ref>: Fix crash with
+       variable sized types.
+
 2004-08-01  Richard Sandiford  <rsandifo@redhat.com>
 
        * doc/invoke.texi: In the MIPS options section, remove the passage
index f2faae3..884bbe4 100644 (file)
@@ -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)))
          {