From patchwork Tue Oct 11 16:57:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 1927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2200904wrs; Tue, 11 Oct 2022 09:58:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6oVtjkHpIv4E6KYbfQGcih8eGUWzB4gLBMMVhS6PGXlmwUXYq0FlNAoapSEhuy46R5Vpcf X-Received: by 2002:aa7:d458:0:b0:45b:ddbf:39fa with SMTP id q24-20020aa7d458000000b0045bddbf39famr16118919edr.335.1665507523744; Tue, 11 Oct 2022 09:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665507523; cv=none; d=google.com; s=arc-20160816; b=gVZn09LTth2nVVuHZ+xh75SkxVyXYDvNIq0KRqDBbjwTcT1doNLDBFgols9f8JZddC 2fT49BnEc4zc/qTWx7UzSboBTlbQOep8VDYW8vzB2/166iBcBGMeE8cM5f4sBrh4VB5b Q9lGtiSjQSLtj+y+4hO6giZBu1R3MUs1FMkkym6DaKA1i5g/g8OZtcXNUmNVW+g5wXB4 sUUE3HoUdB9oRpCa1Lo8B3D4r2z72ftsYF6S8lDafuh/64cNFLbWVPjXxPJ4EM1vJ3+v PC4EL6BgyGfNjvcRTDzkB6X7o+sqJBr3hBuC7NhaCOFfZZS4BPFPDaB81snm7X5MIRRj jfIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=b6edgkwmcjT1u+LC9pET7gHpmAuvNFmYPd2F0RP16X4=; b=JHZEmgO+oIEt4sXG5hqz29Cj3DDZ2rrBVAism8Ue0n02DLMNuO8tDRgU2RidvyPtPR syjjJYUd/Q3So6pyytGBic5j9VfyWZyI0yNXZ7h93iaS/B5LeGfo7Hh4FqF48iAVbNjP Xp3PX77R0v2X+MMPS0TCH59JaaRcOYk5D4Unx5FaN7xnPy4NS5WXTH2mIV4Evp+DItz6 uOrjvbVDlsAV6ciI/ksb6l9wrVBZjKVwSuCTdAEPvHnZ8GAddQFXrt5Gd7DJ0ffTQ4TP uakgsH7S1vYEdJb3/bGNksJ038xIWguixgnr1cdbSkElzG5knuOW7zRd2JXaJrVIDXIi HUVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YxuQ22Bw; 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=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i2-20020a170906698200b0073d8830e4c7si12517315ejr.954.2022.10.11.09.58.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 09:58:43 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=YxuQ22Bw; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 728F4385843A for ; Tue, 11 Oct 2022 16:58:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 728F4385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665507522; bh=b6edgkwmcjT1u+LC9pET7gHpmAuvNFmYPd2F0RP16X4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=YxuQ22BwOpf7usWkEeoIKr/CawSDMEVAgIqJp/2tZkX+2ueL6iZaTOZOzzosgvmr5 6vlLqPxZ523OrC9n4SMeADvvcEzW1BAqsSR0UqCaYEhZYyv5YNpYyYv1ltkv6HyJCm cL5yOXeLledoxOsoDzDQsuQtPyQtC/8CMT8hG9e0= 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 6DDA93858D28 for ; Tue, 11 Oct 2022 16:57:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6DDA93858D28 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-531-sQJAJLEHP-C3gtL2pl30yA-1; Tue, 11 Oct 2022 12:57:56 -0400 X-MC-Unique: sQJAJLEHP-C3gtL2pl30yA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CAB043C1104A for ; Tue, 11 Oct 2022 16:57:55 +0000 (UTC) Received: from pdp-11.redhat.com (unknown [10.22.17.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3CAAC2C8D8 for ; Tue, 11 Oct 2022 16:57:55 +0000 (UTC) To: GCC Patches Subject: [PATCH] testsuite: Only run -fcf-protection test on i?86/x86_64 [PR107213] Date: Tue, 11 Oct 2022 12:57:50 -0400 Message-Id: <20221011165750.328974-1-polacek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Marek Polacek via Gcc-patches From: Marek Polacek Reply-To: Marek Polacek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746411217053721762?= X-GMAIL-MSGID: =?utf-8?q?1746411217053721762?= This test fails on non-i?86/x86_64 targets because on those targets we get error: '-fcf-protection=full' is not supported for this target so this patch limits where the test is run. Tested on x86_64-pc-linux-gnu, ok for trunk? gcc/testsuite/ChangeLog: * c-c++-common/pointer-to-fn1.c: Only run on i?86/x86_64. --- gcc/testsuite/c-c++-common/pointer-to-fn1.c | 1 + 1 file changed, 1 insertion(+) base-commit: 637e3668fdc17c4e226538fb14f9fab225433d01 diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c b/gcc/testsuite/c-c++-common/pointer-to-fn1.c index 975885462e9..e2f948d824a 100644 --- a/gcc/testsuite/c-c++-common/pointer-to-fn1.c +++ b/gcc/testsuite/c-c++-common/pointer-to-fn1.c @@ -1,4 +1,5 @@ /* PR c++/106937 */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fcf-protection" } */ /* { dg-additional-options "-std=c++11 -fpermissive" { target c++ } } */ /* Test printing a pointer to function with attribute. */