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: 1688732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.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=YaoSVh+o; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mn26X1vKyz23jS for ; Wed, 12 Oct 2022 03:58:26 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D8CE38582B7 for ; Tue, 11 Oct 2022 16:58:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D8CE38582B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665507499; bh=b6edgkwmcjT1u+LC9pET7gHpmAuvNFmYPd2F0RP16X4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=YaoSVh+oPKcCnSeA34k7KRErIocAPZUqqPQY+ARa1SFK9qcRXnZBJ+/Lpt4nqdfge V0Iijk70xjHj2LcqywZ91xFd8/JcqrPuRFbGKeLVlHLYMSLvKU2agndIu4djd8DK+j NpRqEMEEOrU/XqYTXmuHke1fljunRO81iWg4Tyhc= 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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. */