From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7176 invoked by alias); 30 Jul 2007 22:48:19 -0000 Received: (qmail 7167 invoked by uid 22791); 30 Jul 2007 22:48:18 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 30 Jul 2007 22:48:16 +0000 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id l6UMm9W6000671; Mon, 30 Jul 2007 23:48:10 +0100 Received: from frodo.local ([172.29.122.109]) by zps37.corp.google.com with ESMTP id l6UMlsOX002734; Mon, 30 Jul 2007 15:47:55 -0700 Message-ID: <46AE6A9B.6030107@google.com> Date: Tue, 31 Jul 2007 00:01:00 -0000 From: Diego Novillo User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, Aldy Hernandez , Christopher Matthews Subject: [tuples] Fix libgcc gimplification Content-Type: multipart/mixed; boundary="------------010900000401090506070502" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg02152.txt.bz2 This is a multi-part message in MIME format. --------------010900000401090506070502 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 487 With this patch we can now gimplify all of libgcc without ICEing. The library isn't built, of course, as we still do not generate any code, but at least we can gimplify all of it. Aldy, Chris, we should add this as another test whenever we test patches. Make sure that we can continue going through libgcc and gimple.exp. Will commit as soon as I regain connectivity to gcc.gnu.org (not sure if it's a local problem, as this machine is having issues with some other sites as well). --------------010900000401090506070502 Content-Type: text/x-patch; name="20070730-fix-libgcc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="20070730-fix-libgcc.diff" Content-length: 1362 2007-07-30 Diego Novillo * gimplify.c (get_tmp_var_for): When creating a new temporary for a GIMPLE_CALL, use the type returned by the function call instead of the type of the function decl. * gimple.c (build_gimple_return): Accept NULL and RESULT_DECL return values. Index: gimplify.c =================================================================== --- gimplify.c (revision 127067) +++ gimplify.c (working copy) @@ -640,7 +640,8 @@ get_tmp_var_for (gimple stmt) if (code == GIMPLE_ASSIGN) return create_tmp_from_val (gimple_assign_operand (stmt, 1)); else if (code == GIMPLE_CALL) - return create_tmp_from_val (gimple_call_fn (stmt)); + return create_tmp_var (TREE_TYPE (TREE_TYPE (gimple_call_fn (stmt))), + get_name (gimple_call_fn (stmt))); else gcc_unreachable (); Index: gimple.c =================================================================== --- gimple.c (revision 127018) +++ gimple.c (working copy) @@ -145,7 +145,9 @@ gimple build_gimple_return (bool result_decl_p, tree retval) { gimple s = build_gimple_with_ops (GIMPLE_RETURN, (int) result_decl_p, 1); - gcc_assert (is_gimple_val (retval)); + gcc_assert (retval == NULL_TREE + || TREE_CODE (retval) == RESULT_DECL + || is_gimple_val (retval)); gimple_return_set_retval (s, retval); return s; } --------------010900000401090506070502--