From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72584 invoked by alias); 16 Mar 2016 16:58:46 -0000 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 Received: (qmail 72424 invoked by uid 89); 16 Mar 2016 16:58:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=xxx X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 16 Mar 2016 16:58:41 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 29D50C049E16; Wed, 16 Mar 2016 16:58:40 +0000 (UTC) Received: from [10.3.113.138] (ovpn-113-138.phx2.redhat.com [10.3.113.138]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2GGwcpC014498; Wed, 16 Mar 2016 12:58:39 -0400 Subject: Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class To: "H.J. Lu" References: <20160302162538.66068C88E@oc7340732750.ibm.com> <56E82BC4.7070401@redhat.com> <56E8633B.8070303@redhat.com> Cc: Ulrich Weigand , GCC Patches , Jakub Jelinek , Richard Biener , Markus Trippelsdorf From: Jason Merrill Message-ID: <56E990BE.1020104@redhat.com> Date: Wed, 16 Mar 2016 16:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------060500050307080308020906" X-SW-Source: 2016-03/txt/msg00934.txt.bz2 This is a multi-part message in MIME format. --------------060500050307080308020906 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1651 On 03/16/2016 08:38 AM, H.J. Lu wrote: > FAIL: g++.dg/abi/pr60336-1.C scan-assembler jmp[\t ]+[^$]*?_Z3xxx9true_type > FAIL: g++.dg/abi/pr60336-5.C scan-assembler jmp[\t ]+[^$]*?_Z3xxx9true_type > FAIL: g++.dg/abi/pr60336-6.C scan-assembler jmp[\t ]+[^$]*?_Z3xxx9true_type > FAIL: g++.dg/abi/pr60336-7.C scan-assembler jmp[\t ]+[^$]*?_Z3xxx9true_type > FAIL: g++.dg/abi/pr60336-9.C scan-assembler jmp[\t ]+[^$]*?_Z3xxx9true_type > FAIL: g++.dg/abi/pr68355.C scan-assembler jmp[\t > ]+[^$]*?_Z3xxx17integral_constantIbLb1EE These pass for me on x86_64, but I do see calls with -m32. > They are expected since get_ref_base_and_extent needs to be > changed to set bitsize to 0 for empty types so that when > ref_maybe_used_by_call_p_1 calls get_ref_base_and_extent to > get 0 as the maximum size on empty type. Otherwise, find_tail_calls > won't perform tail call optimization for functions with empty type > parameters. That isn't why the optimization isn't happening in pr68355 with -m32; the .optimized dump has xxx (D.2289); [tail call] Rather, the failure seems to happen in load_register_parameter, at > /* Check for overlap with already clobbered argument area, > providing that this has non-zero size. */ > if (is_sibcall > && (size == 0 > || mem_overlaps_already_clobbered_arg_p > (XEXP (args[i].value, 0), size))) > *sibcall_failure = 1; The code seems to contradict the comment, and seems to have been broken by r162402. Applying this additional patch fixes those tests. --------------060500050307080308020906 Content-Type: text/x-patch; name="sibcall.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sibcall.patch" Content-length: 824 commit b9e170023d97cef94f9b88ded1dfd3b4cf993294 Author: Jason Merrill Date: Wed Mar 16 12:57:37 2016 -0400 * calls.c (load_register_parameters): Fix zero size sibcall logic. diff --git a/gcc/calls.c b/gcc/calls.c index 7b28f43..6415e08 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2083,9 +2083,9 @@ load_register_parameters (struct arg_data *args, int num_actuals, /* Check for overlap with already clobbered argument area, providing that this has non-zero size. */ if (is_sibcall - && (size == 0 - || mem_overlaps_already_clobbered_arg_p - (XEXP (args[i].value, 0), size))) + && size != 0 + && (mem_overlaps_already_clobbered_arg_p + (XEXP (args[i].value, 0), size))) *sibcall_failure = 1; if (size % UNITS_PER_WORD == 0 --------------060500050307080308020906--