expr.c (expand_expr_real_1): Fix crash with variable sized types.
authorRichard Henderson <rth@redhat.com>
Sun, 1 Aug 2004 21:12:20 +0000 (14:12 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 1 Aug 2004 21:12:20 +0000 (14:12 -0700)
        * expr.c (expand_expr_real_1) <normal_inner_ref>: Fix crash with
        variable sized types.

From-SVN: r85412

gcc/ChangeLog
gcc/expr.c

index 118e96a90e73a80728b42b903185674de3f7abee..24af3471a4a59dbeaa61fe624f792259def64b31 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 f2faae301a6a0c40970b69347e9f6221d9c977c4..884bbe4a5fb3bf5008ae9011e0a4b7028ca7e780 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)))
          {