(convert): When converting to variant of same type, fold.

From-SVN: r1824
This commit is contained in:
Richard Stallman 1992-08-14 08:36:14 +00:00
parent 70038ec981
commit 542bc952de

View File

@ -375,7 +375,7 @@ convert (type, expr)
|| TREE_CODE (expr) == ERROR_MARK)
return expr;
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
return build1 (NOP_EXPR, type, expr);
return fold (build1 (NOP_EXPR, type, expr));
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)