From patchwork Thu Jul 9 15:39:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 50975 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7817E213FD for ; Thu, 9 Jul 2015 15:41:17 +0000 (UTC) Received: by lbbpo10 with SMTP id po10sf33496099lbb.1 for ; Thu, 09 Jul 2015 08:41:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:sender:delivered-to:from:to:subject:date:message-id :x-original-sender:x-original-authentication-results; bh=YKB+oKv6bjFBPXQDxrb/WJQDxCm6GpXlBmCQn9FvTzA=; b=deDxyxnbUUZqRCanTueIIhQ39TYZ4vo9kY7VO/bukvojinl5uwkwRrWRlHFuewY1nL cK7JMtM4gBakKTcevdWyD9zEi3jG+ANzx/Ek0G7q7njzm3ab4qrjDhZ0LhY0sEisq8lX sdE6IG6o0NMW+8AyP9ItRJsLcYqd4UiunWI/Xt2ChX2Uvk+NWKqzzCMFzwlgzc6XPn2I Z8RQHghpKmc3NrRkOCJWWl11ba1EvDW8DhsES8TE/eagCDJjIBomLP5YGSwa6y1v055e Y6qpN12Ivsj/WImk+Xw+DG2DObLk2LqqusiE3pnmrW4SMaZqiiw0rRL/HfSOeDFvDZHP ZnjQ== X-Gm-Message-State: ALoCoQm0X1L22k+tL40aE/j3GyDp27KIPe3uozzLAGQHhcGuwuWy/iwZ0iSfWMyhLQFZIR7wfrHi X-Received: by 10.152.6.103 with SMTP id z7mr8275517laz.8.1436456476408; Thu, 09 Jul 2015 08:41:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.2 with SMTP id t2ls1123313laz.8.gmail; Thu, 09 Jul 2015 08:41:16 -0700 (PDT) X-Received: by 10.152.181.34 with SMTP id dt2mr15361712lac.84.1436456476264; Thu, 09 Jul 2015 08:41:16 -0700 (PDT) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com. [2a00:1450:4010:c04::233]) by mx.google.com with ESMTPS id bc7si5095257lbc.144.2015.07.09.08.41.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 08:41:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::233 as permitted sender) client-ip=2a00:1450:4010:c04::233; Received: by lbnk3 with SMTP id k3so77460286lbn.1 for ; Thu, 09 Jul 2015 08:41:16 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr15155894lbc.41.1436456476144; Thu, 09 Jul 2015 08:41:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp746990lbb; Thu, 9 Jul 2015 08:41:15 -0700 (PDT) X-Received: by 10.70.44.199 with SMTP id g7mr32632245pdm.27.1436456474352; Thu, 09 Jul 2015 08:41:14 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id oz3si9862117pdb.69.2015.07.09.08.41.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 08:41:14 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-402514-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 44580 invoked by alias); 9 Jul 2015 15:41:02 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 43800 invoked by uid 89); 9 Jul 2015 15:41:01 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f45.google.com Received: from mail-wg0-f45.google.com (HELO mail-wg0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 09 Jul 2015 15:41:00 +0000 Received: by wgxm20 with SMTP id m20so43698092wgx.3 for ; Thu, 09 Jul 2015 08:40:57 -0700 (PDT) X-Received: by 10.180.83.137 with SMTP id q9mr129569760wiy.68.1436456457130; Thu, 09 Jul 2015 08:40:57 -0700 (PDT) Received: from gnx2647.guests.st.com (29-39.80-90.static-ip.oleane.fr. [90.80.39.29]) by smtp.gmail.com with ESMTPSA id sc16sm9405597wjb.28.2015.07.09.08.40.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 08:40:56 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org Subject: [PATCH] [testsuite] Disable attr_thumb.c test when Thumb mode is not supported. Date: Thu, 9 Jul 2015 17:39:33 +0200 Message-Id: <1436456373-3369-1-git-send-email-christophe.lyon@linaro.org> X-IsSubscribed: yes X-Original-Sender: christophe.lyon@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::233 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Some multilibs do not support Thumb mode on ARM targets. This is the case for instance when target is arm-linux-gnueabihf and with -march=armv5-t: Thumb-1 hard-float VFP ABI is not implemented. In this configuration, gcc.target/arm/attr_thumb.c is failing because we switch thumb mode via an attribute. This patch makes this test unsupported, by adding a new function in lib/target-supports.exp: check_effective_target_arm_thumb_ok. OK? 2015-07-09 Christophe Lyon * lib/target-supports.exp (check_effective_target_arm_thumb_ok): New function. * gcc.target/arm/attr_thumb.c: Call check_effective_target_arm_thumb_ok. Change-Id: I60d9e008a0691f24d1d8c295a7e4364fb5df9dc3 diff --git a/gcc/testsuite/gcc.target/arm/attr_thumb.c b/gcc/testsuite/gcc.target/arm/attr_thumb.c index 02ddfda..6553e65 100644 --- a/gcc/testsuite/gcc.target/arm/attr_thumb.c +++ b/gcc/testsuite/gcc.target/arm/attr_thumb.c @@ -1,5 +1,7 @@ /* Check that attribute target thumb is recognized. */ /* { dg-do compile } */ +/* Make sure the current multilib supports thumb. */ +/* { dg-require-effective-target arm_thumb_ok } */ /* { dg-options "-O2 -mno-restrict-it" } */ /* { dg-final { scan-assembler-not "\\.arm" } } */ /* { dg-final { scan-assembler "\\.thumb_func" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index bf512e9..7cc5bbf 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2910,6 +2910,15 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ }] } +# Return 1 if this is an ARM target supporting -mthumb. Some +# multilibs may be incompatible with this option. + +proc check_effective_target_arm_thumb_ok { } { + return [check_no_compiler_messages arm_thumb_ok object { + int foo (int i) { return i; } + } "-mthumb"] +} + # Return 1 if this is an ARM target where -marm causes ARM to be # used (not Thumb)