From patchwork Thu Sep 20 22:06:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 185514 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]) by ozlabs.org (Postfix) with SMTP id EEDCB2C0080 for ; Fri, 21 Sep 2012 08:06:21 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348783582; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=gFAk9sM HF2gp7Ttr6sUgPbgM0Xc=; b=gkFgq+WZpkz/VlXawHKlXabdXWoolJIzoWA0XkG /eVxUxGva54o+Epw6X2bXZ5kYEZ7Of4IMBrcZqdm/X4EWMm+Yxmbu+WIjIVemZHz KkFFlzk1FrW5wygZ4QprsHuw9RtL5TwefIxAykMn9nXkqgXRH3pqg0UFgRcVziqF 225c= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=vIGJ0vQuyc32E8BmUy81gykGEahizbPsXMXuJfkUfKDO3M0tY7SRtLJTSi4bHl EVzNEvDtO1j8+MhqzcWi8A6RX/WljId6ctDDLIEKx19jO2/iDNa5HgKlArs+G19S ROssdOG9m/fNUHhaqcwjICAodVCRhRIq8szOsHwj6PmuY=; Received: (qmail 20518 invoked by alias); 20 Sep 2012 22:06:17 -0000 Received: (qmail 20501 invoked by uid 22791); 20 Sep 2012 22:06:16 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qa0-f47.google.com (HELO mail-qa0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Sep 2012 22:06:03 +0000 Received: by qafi29 with SMTP id i29so168532qaf.20 for ; Thu, 20 Sep 2012 15:06:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=sZMOp6OAwp1LEfoXU3Pw41z62T+jAYcuZH2JJzv+EUE=; b=NHCce5DjhGhgOzs4eXwrZowUg5Y6bQNFOtKqb+I+Tr5c/HjJyZSJSh0/4V5S39Cl71 a7n/WKkUDAs/HucJT7Tac0UX7OcgGXWVaUrVSc+e578y8WCX6AfKc+XpJ6xaND8Z59kW t5NyE5O1zky0a6mVU9Po4uEWclzFa4AIoU3BQN6QbUB+qPFjJhnk2f/1OIjOKc59Y711 T4pBn5CVgwoUbS2Y4MKWrBN/2jVbmRNTsh3DT4+79xhvvCsqTubDLjFmtXXa7RkNBkAA 2k86tJ7qYQ1L3wJ0Of0Y0wYDh4R+VnAVoqpKFH5HJxb0Q+gOWsVW3rshskJaOQj/uLY7 CjkA== MIME-Version: 1.0 Received: by 10.229.135.13 with SMTP id l13mr2069610qct.98.1348178762323; Thu, 20 Sep 2012 15:06:02 -0700 (PDT) Received: by 10.49.105.168 with HTTP; Thu, 20 Sep 2012 15:06:02 -0700 (PDT) Date: Fri, 21 Sep 2012 00:06:02 +0200 Message-ID: Subject: [Patch, ARM, testsuite] From: Christophe Lyon To: gcc-patches@gcc.gnu.org X-Gm-Message-State: ALoCoQlKq7d37ElbJcdyiEAo7kBx0JfLQvMPp/4Tc0oyATWaalDK+ISS+K7brVeKsKDGUf+6IMR8 X-IsSubscribed: yes 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 Hi, GCC for ARM does not support compiling in Thumb1 mode and float-abi=hard. But it does not fail unless the program being compiled actually contains a function with parameters and/or a return value. This is a (minor) problem in the testsuite in some configurations. For instance, if I run the testsuite forcing -mthumb (via site.exp) for a GCC configured for float-abi=hard, and a test uses /* { dg-require-effective-target arm_arch_v6_ok } */ /* { dg-add-options arm_arch_v6 } */ it won't be unresolved since effective-target arm_arch_v6_ok is successful. The attached patch adds a dummy function body in the test such that it fails. Another way of achieving the same result is by making sure that the relevant tests use arm_arch_v6_multilib instead of arm_arch_v6_ok even if the test is not intended to be executed. OK? Christophe. 2012-09-21 Christophe Lyon gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Add function body to force error messages in some configurations. * gcc.target/arm/v6-ok.c: New test. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f597316..bc7d451 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2211,6 +2211,11 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ #if !defined (DEF) #error FOO #endif + int + main (void) + { + return 0; + } } "FLAG" ] } diff --git a/gcc/testsuite/gcc.target/arm/v6-ok.c b/gcc/testsuite/gcc.target/arm/v6-ok.c new file mode 100644 index 0000000..4eb1aed --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/v6-ok.c @@ -0,0 +1,8 @@ +/* Check that compiling for armv6 is OK. This is useful to detect + configurations leading to thumb1 and float-abi=hard, which are not + supported currently. */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v6_ok } */ +/* { dg-add-options arm_arch_v6 } */ + +int func(void) { return 0; }