(output_init_element): When try to copy FIELD if it
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 5 Oct 1993 20:39:48 +0000 (13:39 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 5 Oct 1993 20:39:48 +0000 (13:39 -0700)
is an interger constant, first check to make sure it is nonzero.

From-SVN: r5617

gcc/c-typeck.c

index 82d4fa4889f8d294b90f876ed75ccffcc4ab09ee..489f606c50ff330b92828014fd2687f2520ab797 100644 (file)
@@ -5491,7 +5491,7 @@ output_init_element (value, type, field, pending)
        {
          if (! constructor_incremental)
            {
-             if (TREE_CODE (field) == INTEGER_CST)
+             if (field && TREE_CODE (field) == INTEGER_CST)
                field = copy_node (field);
              constructor_elements
                = tree_cons (field, digest_init (type, value, 0, 0),