From patchwork Thu Apr 23 11:48:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1275720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=lEep2waF; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 497Ftj0Ylsz9sRN for ; Thu, 23 Apr 2020 21:48:27 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 024F73955CA6; Thu, 23 Apr 2020 11:48:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 024F73955CA6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587642505; bh=kAyKakxg8BZqU82hv2aSe7fqzaqoGaSQycPMUM/50wQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=lEep2waFSx3bzNq43TEVppNObEcSD0MX3JRi5VjTb1OvIDuu4wpTNmMpraBN4CElb ICJdgxy+hlnvr5boPXqtAFIftTdYn9XfbaznWAe9xXFFJHIHf/Ekj9CTW7pO66Q8/y lol9LA+UcoylpQCRb0rxEX1qDOvuMlqqnDuw+dPc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 811353851C06 for ; Thu, 23 Apr 2020 11:48:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 811353851C06 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-441-Sub8Hc-kOCKZbus2tV8Blg-1; Thu, 23 Apr 2020 07:48:18 -0400 X-MC-Unique: Sub8Hc-kOCKZbus2tV8Blg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4732CDB60; Thu, 23 Apr 2020 11:48:17 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-104.ams2.redhat.com [10.36.112.104]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91DF75C1BD; Thu, 23 Apr 2020 11:48:16 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 03NBm3Y3012180; Thu, 23 Apr 2020 13:48:09 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 03NBm057012179; Thu, 23 Apr 2020 13:48:00 +0200 Date: Thu, 23 Apr 2020 13:48:00 +0200 To: Segher Boessenkool , Richard Sandiford , Matthew Malcomson Subject: [PATCH] rs6000: Small improvement to the C++17 ABI fix [PR94707] Message-ID: <20200423114800.GX2424@tucnak> References: <20200422131148.GK2424@tucnak> <20200422221056.GA26902@gate.crashing.org> <20200423080616.GU2424@tucnak> <20200423102419.GC26902@gate.crashing.org> MIME-Version: 1.0 In-Reply-To: <20200423102419.GC26902@gate.crashing.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-17.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, David Edelsohn Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" On Thu, Apr 23, 2020 at 05:24:19AM -0500, Segher Boessenkool wrote: > > + inform (input_location, > > + "parameter passing for argument of type %qT " > > + "when C++17 is enabled changed to match C++14 " > > + "in GCC 10.1", type); > > It isn't "to match C++14". It simply is a bugfix, we didn't follow > the ABI before :-) The reason for the exact wording was to make it clearer to the user that C++17 doesn't have a different ABI from C++14 now, but it had in the older releases. Anyway, based on IRC discussion with Richard Sandiford on IRC, we should probably test type uids instead of type pointers because type uids aren't reused, but type pointers in a very bad luck case could be, and having the static var at filescope and GTY((deletable)) is an overkill (and with costs during GC time). Ok if it passes bootstrap/regtest? 2020-04-23 Jakub Jelinek PR target/94707 * config/rs6000/rs6000-call.c (rs6000_discover_homogeneous_aggregate): Use TYPE_UID (TYPE_MAIN_VARIANT (type)) instead of type to check if the same type has been diagnosed most recently already. Jakub --- gcc/config/rs6000/rs6000-call.c.jj 2020-04-23 09:59:12.002172006 +0200 +++ gcc/config/rs6000/rs6000-call.c 2020-04-23 13:42:10.037745872 +0200 @@ -5739,14 +5739,15 @@ rs6000_discover_homogeneous_aggregate (m *n_elts = field_count; if (cxx17_empty_base_seen && warn_psabi) { - static const_tree last_reported_type; - if (type != last_reported_type) + static unsigned last_reported_type_uid; + unsigned uid = TYPE_UID (TYPE_MAIN_VARIANT (type)); + if (uid != last_reported_type_uid) { inform (input_location, "parameter passing for argument of type %qT " "when C++17 is enabled changed to match C++14 " "in GCC 10.1", type); - last_reported_type = type; + last_reported_type_uid = uid; } } return true;