Commit 1d33b2a9 by Jim Wilson

(process_init_element): For fieldtype, don't access

TYPE_MAIN_VARIANT field if the type is error_mark_node.

From-SVN: r7521
parent abdf3eea
...@@ -5999,7 +5999,9 @@ process_init_element (value) ...@@ -5999,7 +5999,9 @@ process_init_element (value)
break; break;
} }
fieldtype = TYPE_MAIN_VARIANT (TREE_TYPE (constructor_fields)); fieldtype = TREE_TYPE (constructor_fields);
if (fieldtype != error_mark_node)
fieldtype = TYPE_MAIN_VARIANT (fieldtype);
fieldcode = TREE_CODE (fieldtype); fieldcode = TREE_CODE (fieldtype);
/* Accept a string constant to initialize a subarray. */ /* Accept a string constant to initialize a subarray. */
...@@ -6060,7 +6062,9 @@ process_init_element (value) ...@@ -6060,7 +6062,9 @@ process_init_element (value)
break; break;
} }
fieldtype = TYPE_MAIN_VARIANT (TREE_TYPE (constructor_fields)); fieldtype = TREE_TYPE (constructor_fields);
if (fieldtype != error_mark_node)
fieldtype = TYPE_MAIN_VARIANT (fieldtype);
fieldcode = TREE_CODE (fieldtype); fieldcode = TREE_CODE (fieldtype);
/* Accept a string constant to initialize a subarray. */ /* Accept a string constant to initialize a subarray. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment