From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 59F3B3858C31 for ; Thu, 29 Feb 2024 17:56:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 59F3B3858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 59F3B3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709229421; cv=none; b=PMySBSUkgVLBq6HiJqr1v56+0yXvKzy2d/lvAG6yOa7sDx3kn2w3XJmgfU2k3wPAYYC1iS89Uk0kCdHK1wV3sKh+Q4AlmoF5IUtizQZRN2RT6ihri694ohw0zw8nWnuGKqht9YGTn3wQGREIElB0JPrcI9Dz2LrURlh6QN0T7Cw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709229421; c=relaxed/simple; bh=kEEcy7lqK8nsjBD00Wx3pRmZ4Zp6y8OuaAqbjBtyQmE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Ly/DbzFR5dNyb/HHqf4j9Qq7tbOlnro80N9ibK3m645ylzU88wdj6eHePGSdog5S9oBD75dcN5ICN/qdcUib5wRcpFgYkQQ7H2Ur3uf0EB/wqpc3dpPJUGnG/MMkR93j73lgumdh7kIlqwX3uGiq4+OMR/dJ9TmVvOsWIAm1DeQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709229419; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=q0p6rXvQDuW7ar16bfj5iy5p0CIh5TTDnSmSkgO3NC0=; b=GXdQ+IvlJQuI3FZCg5MIltB0zPQhB5HKFMohascBpS57sUS9n+nOBj23xXT4ozSLk4iE1R j3xRqU+OL740uJPFednJ8CeD0mnnPyVOBUFVDhQp2uRckZBZ1cTHyHSBuMS+Us11UZdmwL 2Adzt4I/X/BSGlJ6/eLfcoKEZM3upjg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-311-uNO9On0XOuGp-_hYnPxOag-1; Thu, 29 Feb 2024 12:56:54 -0500 X-MC-Unique: uNO9On0XOuGp-_hYnPxOag-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CEE9185A780; Thu, 29 Feb 2024 17:56:54 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.226.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C98B440C6EBA; Thu, 29 Feb 2024 17:56:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 41THupFF1823009 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 29 Feb 2024 18:56:51 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 41THupHj1823008; Thu, 29 Feb 2024 18:56:51 +0100 Date: Thu, 29 Feb 2024 18:56:50 +0100 From: Jakub Jelinek To: "Richard Earnshaw (lists)" Cc: "Joseph S. Myers" , Richard Biener , Jeff Law , gcc-patches@gcc.gnu.org, =?iso-8859-1?Q?Torbj=F6rn?= SVENSSON , oliva@adacore.com Subject: Re: [PATCH] calls: Further fixes for TYPE_NO_NAMED_ARGS_STDARG_P handling [PR107453] Message-ID: Reply-To: Jakub Jelinek References: <45ac2d54-21df-486c-a085-0a6c1f37a323@arm.com> <23c7c873-1954-43b2-80b8-714455eaaf2b@arm.com> <9b4f43f8-3807-432f-b1a2-e0515ab198ca@arm.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Feb 29, 2024 at 05:51:03PM +0000, Richard Earnshaw (lists) wrote: > Oh, but wait! Perhaps that now falls into the initial 'if' clause and we never reach the point where you pick zero. So perhaps I'm worrying about nothing. If you are worried about the + else if (TYPE_NO_NAMED_ARGS_STDARG_P (funtype) + && ! targetm.calls.pretend_outgoing_varargs_named (args_so_far)) n_named_args = 0; case in the patch, we know at that point that the initial n_named_args is equal to structure_value_addr_parm, so either 0, in that case --n_named_args; would yield the undesirable negative value, so we want 0 instead; for that case we could as well just have ; in there instead of n_named_args = 0;, or it is 1, in that case --n_named_args; would turn that into 0. Jakub