(process_init_element): Check for constructor_type
authorJim Wilson <wilson@gcc.gnu.org>
Sun, 27 Feb 1994 22:41:53 +0000 (14:41 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Sun, 27 Feb 1994 22:41:53 +0000 (14:41 -0800)
set before dereferencing it in the string cst code.

From-SVN: r6656

gcc/c-typeck.c

index b23338583be4f99001f503f893dfdb3949bf9809..97fb2568840feb789a0da20be5e38ecc1f9f97dc 100644 (file)
@@ -5872,6 +5872,7 @@ process_init_element (value)
   /* Handle superfluous braces around string cst as in
      char x[] = {"foo"}; */
   if (string_flag
+      && constructor_type
       && TREE_CODE (constructor_type) == ARRAY_TYPE
       && TREE_CODE (TREE_TYPE (constructor_type)) == INTEGER_TYPE
       && integer_zerop (constructor_unfilled_index))