From patchwork Fri Dec 2 16:35:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 702035 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tVfsh43vKz9t1H for ; Sat, 3 Dec 2016 03:35:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="cirmXMbN"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=YF6i57oru3Ax34S1nUlLPKwrRqOnP2N97GE9tjdI56xKB8GgFs 518dpggaPLg1jeaPQocGjIgaG8/rHyzM9PUWtGS2vzCHdyRN8iCvExm+FUCs4SGW Sr/Yc3qIGF4KgAyYCvVqkT+KDYFbTlgR4sHKlqr+zUIqQ8/5nk2SRVVTs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=PnuS8BMPARlb3U6Kno/nCsJxcBw=; b=cirmXMbN75buCe+4GYXn uI9KFans0sKmX8V7Ri0mumcKMjjegxjO8FmISppyhb/YMcLyWURBHUB3gbGTyCup 3deOQkxrgVeA/p1iqS6KZmUvvmPTX442MH20yqBGI68+Jbjh6Gw1vHRvSze4B6vc kdHtfo60XcN2zfTWsWY8IIA= Received: (qmail 82058 invoked by alias); 2 Dec 2016 16:35:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 82046 invoked by uid 89); 2 Dec 2016 16:35:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, KAM_LOTSOFHASH, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Dec 2016 16:35:31 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85CAC1596; Fri, 2 Dec 2016 08:35:29 -0800 (PST) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C50EB3F24D; Fri, 2 Dec 2016 08:35:28 -0800 (PST) To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" From: Thomas Preudhomme Subject: [PATCH, GCC/testsuite/ARM] XFAIL optional_thumb-1 and optional_thumb-2 testcases Message-ID: <87b44d5d-4277-8979-67a5-6e806f28eccc@foss.arm.com> Date: Fri, 2 Dec 2016 16:35:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, The logic to make -mthumb optional for Thumb-only targets was designed to only apply when no mode is specified either at compile time or when the toolchain was configured (using --with-mode). The dg-skip-if in the testcases optional_thumb-1 and optional_thumb-2 catch the former case but not the latter. Unfortunately there is no dejagnu procedure to check the presence of an option in the configure line used for the compiler. This patch marks the two tests as XFAIL since that will at least allow to catch a change from PASS to XFAIL, thus making the test still useful. It also fixes a codestyle issue in the target triplet of the dg-skip-if directives of all the optional_thumb-* testcases. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-12-01 Thomas Preud'homme * gcc.target/arm/optional_thumb-3.c: Fix codestyle issue in target triplet of dg-skip-if. * gcc.target/arm/optional_thumb-1.c: Likewise and add xfail. * gcc.target/arm/optional_thumb-2.c: Likewise. Is this ok for stage3? Best regards, Thomas diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c index 23df62887ba4aaa1d8717a34ecda9a40246f0552..27787bb8a403534abf708be02a80bdcf42638958 100644 --- a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c +++ b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ -/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-*} { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */ +/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */ /* { dg-options "-march=armv6-m" } */ +/* { dg-xfail-if "fails if GCC configured with --with-mode=arm" { *-*-* } } */ /* Check that -mthumb is not needed when compiling for a Thumb-only target. */ diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-2.c b/gcc/testsuite/gcc.target/arm/optional_thumb-2.c index 4bd53a45eca97e62dd3b86d5a1a66c5ca21e7aad..5a8e5e8cfccf8d9175432ef6b5c07cb0b5f7b0bf 100644 --- a/gcc/testsuite/gcc.target/arm/optional_thumb-2.c +++ b/gcc/testsuite/gcc.target/arm/optional_thumb-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ -/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-*} { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */ +/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */ /* { dg-options "-mcpu=cortex-m4" } */ +/* { dg-xfail-if "fails if GCC configured with --with-mode=arm" { *-*-* } } */ /* Check that -mthumb is not needed when compiling for a Thumb-only target. */ diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c index f1fd5c8840b191e600c20a7817c611bb9bb645df..735c2774738c8d84deb14a9f082c34bf622b2d5d 100644 --- a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c +++ b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_cortex_m } */ -/* { dg-skip-if "-mthumb given" { *-*-*} { "-mthumb" } } */ +/* { dg-skip-if "-mthumb given" { *-*-* } { "-mthumb" } } */ /* { dg-options "-marm" } */ /* { dg-error "target CPU does not support ARM mode" "missing error with -marm on Thumb-only targets" { target *-*-*} 0 } */