From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50068 invoked by alias); 16 Mar 2016 19:39:15 -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 50059 invoked by uid 89); 16 Mar 2016 19:39:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=PASS, UD:object-size-9.c, objectsize9c, object-size-9.c X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 16 Mar 2016 19:39:13 +0000 Received: by mail-qg0-f52.google.com with SMTP id u110so52594938qge.3 for ; Wed, 16 Mar 2016 12:39:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=nENVKJX33fHBJxta8HCPcp298U/J8bLji49EWfN9Kio=; b=cTWq6NJTHh5hXiTSsTCC6PocQ40hLGic+5ABOL48f5mMKUItOfz/Ljv1XcJwL2P3nq kyus4t+2nZpUSyJiNKgoL99B1d+lHqcXd2WtJq99QKL1f/DE+QUv/mzI8NQyLqpcldXR V3p0ejNff8VuMcxR/v1kF4dLqq3OGrSsio2LhygpbxWb9nmlsIdg8+tFxb14Yg6WTEog 7aUQFYCnLHUYGfOtQ7WvFDD6VS2bZ2+L+Fl7Z/eIyod65iU0AxaVneM/QdPKQYR2zfpP nmZCxXj0LTXIKzKN6+/CdzVoiLTm+cTOjs0W9KtIheuebjzE1+N+mSSO8ThouN9vJg7/ cXFw== X-Gm-Message-State: AD7BkJJTEdKVXxfw1YlVd+o9hoSNceCnqzE8SfpYsUKUnGvxfX3C2d9sDb4KynsVkxcp9GdC0WL1JHSAiCQzkQ== MIME-Version: 1.0 X-Received: by 10.140.31.135 with SMTP id f7mr4222010qgf.96.1458157151163; Wed, 16 Mar 2016 12:39:11 -0700 (PDT) Received: by 10.55.15.199 with HTTP; Wed, 16 Mar 2016 12:39:10 -0700 (PDT) In-Reply-To: References: <20160302162538.66068C88E@oc7340732750.ibm.com> <56E82BC4.7070401@redhat.com> <56E8633B.8070303@redhat.com> <56E990BE.1020104@redhat.com> Date: Wed, 16 Mar 2016 19:39:00 -0000 Message-ID: Subject: Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class From: "H.J. Lu" To: Jason Merrill Cc: Ulrich Weigand , GCC Patches , Jakub Jelinek , Richard Biener , Markus Trippelsdorf Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00948.txt.bz2 On Wed, Mar 16, 2016 at 10:02 AM, H.J. Lu wrote: > On Wed, Mar 16, 2016 at 9:58 AM, Jason Merrill wrote: >> 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. >> > > I am running the full test now. On x86-64, I got export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.dg/ubsan/object-size-9.c:11:13: runtime error: load of address 0x000000600ffa with insufficient space for an object of type 'char' 0x000000600ffa: note: pointer points here PASS: gcc.dg/ubsan/object-size-9.c -O2 execution test FAIL: gcc.dg/ubsan/object-size-9.c -O2 output pattern test Output was: -- H.J.