This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tuples] fix gimplify_return_expr buglet


Found while building libgcc.

	* gimplify.c (gimplify_return_expr): Handle an empty ret_expr
	gracefully.

Index: gimplify.c
===================================================================
--- gimplify.c	(revision 126800)
+++ gimplify.c	(working copy)
@@ -1123,7 +1123,8 @@ gimplify_return_expr (tree stmt, gimple_
       || ret_expr == error_mark_node)
     {
       gimple_add (pre_p,
-	      gimple_build_return (TREE_CODE (ret_expr) == RESULT_DECL,
+	      gimple_build_return (ret_expr
+				   && TREE_CODE (ret_expr) == RESULT_DECL,
 	                           ret_expr));
       return GS_ALL_DONE;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]