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: 86336 Delivered-To: patch@linaro.org Received: by 10.182.112.6 with SMTP id im6csp415271obb; Fri, 2 Dec 2016 08:35:55 -0800 (PST) X-Received: by 10.84.215.137 with SMTP id l9mr97959585pli.21.1480696555063; Fri, 02 Dec 2016 08:35:55 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 88si5813593plb.324.2016.12.02.08.35.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 08:35:55 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443358-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443358-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443358-patch=linaro.org@gcc.gnu.org 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=P/s4ameGCd5ckwLCVnKLZyXYep3DETFY7Hn+tSbISLw5NhtxC0 yaiY0DcAW/DsWNks++j4tCuaZf7rFYBVIPKngrvqMHFnIxzKCZcPrGRogq1jvrc1 ayzS9roNycBjc0b4JyRFHI1Lf6Q6qfX5Te0pkFDTJbZYiVbjahcapEO/A= 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=g0hMmi5MuTHP+rB9MrgQ MDVNCI/ZxUocSkdgbF0XozAEWCD0nK3yx2tEYi9qVLWsEZ0oJkGRe1TnYpSY9q+M iqYu/dUiEVJrbNdzilpDi2GsUgLBnmL6Cji+rv6dPNyNlqpPRNMJlOWEkdIw6q05 sg4ZE74WNGWVIODfcNGvxM4= 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 } */