(process_init_element): For fieldtype, don't access

TYPE_MAIN_VARIANT field if the type is error_mark_node.

From-SVN: r7521
This commit is contained in:
Jim Wilson 1994-06-18 13:58:57 -07:00
parent abdf3eea96
commit 1d33b2a9b9
1 changed files with 6 additions and 2 deletions

View File

@ -5999,7 +5999,9 @@ process_init_element (value)
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);
/* Accept a string constant to initialize a subarray. */
@ -6060,7 +6062,9 @@ process_init_element (value)
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);
/* Accept a string constant to initialize a subarray. */