From 70768eda2a70f2e637d3422b5479b6f7b6eeb27f Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 3 Dec 1993 07:06:46 -0500 Subject: [PATCH] (c_expand_return): Return if convert_for_assignment returns error_mark_node. From-SVN: r6185 --- gcc/c-typeck.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 15428e4dfd3..ed5fcdcbcec 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -6155,6 +6155,10 @@ c_expand_return (retval) tree t = convert_for_assignment (valtype, retval, "return", NULL_TREE, NULL_TREE, 0); tree res = DECL_RESULT (current_function_decl); + + if (t == error_mark_node) + return; + t = build (MODIFY_EXPR, TREE_TYPE (res), res, convert (TREE_TYPE (res), t)); TREE_SIDE_EFFECTS (t) = 1; -- 2.30.2