aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-08-24 14:34:20 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-08-24 14:34:20 -0400
commit7eec3328e2b481e3bac07bda55e0fcbac2819377 (patch)
tree2b12ff692a27def3e1a4e313e7a8126b8cbd51ae /gcc
parent716b5162780dd9affd57ff1347fb6e8ba52f9579 (diff)
downloadgcc-7eec3328e2b481e3bac07bda55e0fcbac2819377.zip
gcc-7eec3328e2b481e3bac07bda55e0fcbac2819377.tar.gz
gcc-7eec3328e2b481e3bac07bda55e0fcbac2819377.tar.bz2
(push_init_level): Don't blow up if construct_type is null (can happen
with missing brace). From-SVN: r7964
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-typeck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index f5ff3a5..aedc7e5 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -5155,8 +5155,8 @@ push_init_level (implicit)
/* Structure elements may require alignment. Do this now
if necessary for the subaggregate. */
- if (constructor_incremental && TREE_CODE (constructor_type) == RECORD_TYPE
- && constructor_fields)
+ if (constructor_incremental && constructor_type != 0
+ && TREE_CODE (constructor_type) == RECORD_TYPE && constructor_fields)
{
/* Advance to offset of this element. */
if (! tree_int_cst_equal (constructor_bit_index,