From patchwork Wed Nov 29 18:24:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 171538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp537154vqn; Wed, 29 Nov 2023 10:33:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHmn0lW6ye3EVSPfL8UsbGDHtGZReKAvlyQOOgZGzse3lw2As6gqNWXi5Dr4VVeXid5bIK X-Received: by 2002:a05:620a:471f:b0:778:b352:5f0c with SMTP id bs31-20020a05620a471f00b00778b3525f0cmr34667363qkb.28.1701282798749; Wed, 29 Nov 2023 10:33:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701282798; cv=pass; d=google.com; s=arc-20160816; b=yz+E9dXQyLbwL16ph6NPTIDdLTzJbwq94a7YZ7Ne2WuwlvEVekzRm6xausoedXM3Fz DoUzmig8/fmmXGBJWnAeTvAKoIPtGw5WO2kWCHBKAik3dzhKvWTUQPO0gnV6d/TZ7v4V iivb//hUddECOJOuYjiTWqmeEAJb2bXAncFSbWjbM1mwPF9qQ8OsIFWcDYQpnGS8OFgh PrmIc6ufIxrpzSspi1YIye+qa8TqNeHmzY4Tyg35WlkulfL6C2Q+nSb95vB6m6kYIza+ gAgMcbPytXxblWf+oDJDD3TvWVlauxR+WY5eLmky3l68cj/7l1iWwbluNL05oIM01rrL AIVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:resent-to :resent-message-id:resent-date:resent-from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=y7BJzc+BpF+U7RQBRIKWtlKxstkoqETyIMS1KaG3ii0=; fh=m4HM47XsRDkU/WRlrhOFdVuXIJdGHnibC34xjeyr8Fw=; b=MkT+i0t4OxDZrGVnMixTMvlqBvbk8EJ3DWuzYC8f8y659jw3RfV0Tp8+0K5gPy9LZY ixMq2SEo5WIpOtJ6j/5Ud6R6s9b0DSF6XzxB8SeU4QIL4v5TT8kNNTgNruRgksrhRXAl SjJY3aCLiJOignzLof3ykA9Wp5VTnI4DGd+fL55JPc0Ir47gQT/r42CRVjoEQ+aiwyuW QlSd6bKrKqHAGKWJcU9TtMz7r3F/qjo35QbDpgA6+nl8QecPyjlq6y88ilfpgKfyXGz1 +bEnJIMdCrQC9F6aluBq5tf+kpNo0BfleQ543T4xWTFv0Zo6S6g8w3hOZuog49W4weo6 osJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="NdR1pBf/"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bj21-20020a05620a191500b0077d5a0eadf6si14723355qkb.295.2023.11.29.10.33.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 10:33:18 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="NdR1pBf/"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CCA53870899 for ; Wed, 29 Nov 2023 18:33:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 A9E3F383F5FF for ; Wed, 29 Nov 2023 18:32:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A9E3F383F5FF 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 A9E3F383F5FF 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=1701282765; cv=none; b=SZTU5IOsjA7ENhhtrOISFmx0ChP33eDv2I9TEFlc8gKVUih3csvUVF4D+vyzwZ+0qmwUbo/LnBhXM+CtaP3e7gU4YD5ASiT0HyOxbRPIzpzvVfVdc/23qEZd3JbaN4Mi+flxIlkIzjgtyeFUnYW3D3nfixk4EYoKP+w48ybU+0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701282765; c=relaxed/simple; bh=6LY1V9h2+EvmKPAt5QSxJVHB6UQqwDgrFqqDWVv4ONs=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=nKSEF2HqF2V4qJZvC5VBeQ78XFo9M/6gxxGyS1dXUuLcT9FfXlzX/n6pC7VR4hFEOdZAJ3XA5pRHoc2nLzoYAry4xIUd98bAbb7Az6eLhKOQoL2TWN1NyBe399qs/2oEgHgtBAi8w3lERNIrMiXfPXDxE+RrHsTE2D1FS/wR4gw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701282764; 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:resent-to:resent-from:resent-message-id; bh=y7BJzc+BpF+U7RQBRIKWtlKxstkoqETyIMS1KaG3ii0=; b=NdR1pBf/VgTz7okJMU/j5bEN+ATzllljYoZ61UBdfXne2s7+fPwLW1hgMADYD5NHPLAGpZ EK1i8IXAYZJOjHChHMm2+WfWAncNi3ooxZVt2CLXqSbseZhD/rEF5y01m4SHAr/0eTPqF0 Exw4nNzr4c9h8ppJYTPAURyry9QElUs= 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-451-QRRSDgkmMsqMFSSlPGNkaw-1; Wed, 29 Nov 2023 13:32:43 -0500 X-MC-Unique: QRRSDgkmMsqMFSSlPGNkaw-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 B32C2185A783; Wed, 29 Nov 2023 18:32:42 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7720940C6EBB; Wed, 29 Nov 2023 18:32:42 +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 3ATIWdpM3335113 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 19:32:40 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3ATIWdsD3335112; Wed, 29 Nov 2023 19:32:39 +0100 Resent-From: Jakub Jelinek Resent-Date: Wed, 29 Nov 2023 19:32:39 +0100 Resent-Message-ID: Resent-To: gcc-patches@gcc.gnu.org, "Kewen.Lin" Date: Wed, 29 Nov 2023 19:24:38 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Cc: "Kewen.Lin" Subject: [committed] rs6000: Fix up c-c++-common/builtin-classify-type-1.c failure [PR112725] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 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_H4, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783924311900336258 X-GMAIL-MSGID: 1783924311900336258 Hi! The rs6000 backend (and s390 one as well) diagnoses passing vector types to unprototyped functions, which breaks the builtin-classify-type-1.c test. The builtin isn't really unprototyped, it is just type-generic and accepting vector types is just fine there, all it does is categorize the vector type. The following patch makes sure we don't diagnose it for this builtin. Preapproved in the PR, bootstrapped/regtested on powerpc64le-linux where it fixes -FAIL: c-c++-common/builtin-classify-type-1.c -Wc++-compat (test for excess errors) -UNRESOLVED: c-c++-common/builtin-classify-type-1.c -Wc++-compat compilation failed to produce executable and committed to trunk. 2023-11-29 Jakub Jelinek PR target/112725 * config/rs6000/rs6000.cc (invalid_arg_for_unprototyped_fn): Return NULL for __builtin_classify_type calls with vector arguments. Jakub --- gcc/config/rs6000/rs6000.cc.jj 2023-11-17 15:08:20.816961466 +0100 +++ gcc/config/rs6000/rs6000.cc 2023-11-29 09:40:35.782955603 +0100 @@ -24389,7 +24389,8 @@ invalid_arg_for_unprototyped_fn (const_t && VECTOR_TYPE_P (TREE_TYPE (val)) && (funcdecl == NULL_TREE || (TREE_CODE (funcdecl) == FUNCTION_DECL - && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD))) + && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD + && !fndecl_built_in_p (funcdecl, BUILT_IN_CLASSIFY_TYPE)))) ? N_("AltiVec argument passed to unprototyped function") : NULL; }