(convert): Succeed if TYPE is the main variant of the given type.

From-SVN: r1698
This commit is contained in:
Richard Stallman 1992-07-28 02:19:08 +00:00
parent f28e8a6876
commit dacaf84fda
1 changed files with 2 additions and 1 deletions

View File

@ -371,7 +371,8 @@ convert (type, expr)
register tree e = expr;
register enum tree_code code = TREE_CODE (type);
if (type == TREE_TYPE (expr) || TREE_CODE (expr) == ERROR_MARK)
if (type == TYPE_MAIN_VARIANT (TREE_TYPE (expr))
|| TREE_CODE (expr) == ERROR_MARK)
return expr;
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;