This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tuples] fix gimplify_return_expr buglet
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: dnovillo at google dot com, amacleod at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Jul 2007 13:48:14 -0400
- Subject: [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;
}