From patchwork Wed Jun 8 01:06:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 99351 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 BAE1BB6FDE for ; Wed, 8 Jun 2011 11:06:58 +1000 (EST) Received: (qmail 5489 invoked by alias); 8 Jun 2011 01:06:56 -0000 Received: (qmail 5478 invoked by uid 22791); 8 Jun 2011 01:06:56 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_MF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jun 2011 01:06:42 +0000 Received: (qmail 14654 invoked from network); 8 Jun 2011 01:06:41 -0000 Received: from unknown (HELO ?192.168.1.5?) (janisjo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Jun 2011 01:06:41 -0000 Message-ID: <4DEECB2D.9000403@codesourcery.com> Date: Tue, 07 Jun 2011 18:06:53 -0700 From: Janis Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [testsuite] skip ARM neon-fp16 tests for other -mcpu values 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 These tests fail when multilib options use -mfpu=xxxx and override the -mfpu=neon-fp16 used for the test: g++.dg/ext/arm-fp16/arm-fp16-ops-5.C g++.dg/ext/arm-fp16/arm-fp16-ops-6.C gcc.dg/torture/arm-fp16-ops-5.c gcc.dg/torture/arm-fp16-ops-6.c gcc.target/arm/fp16-compile-vcvt.c The option -mfpu-neon-fp16 is added via "dg-add-options arm_neon_fp16" after an earlier "dg-require-effective-target arm_neon_fp16_ok". This patch modifies check_effective_target_arm_neon_fp16_ok_nocache to return 0 (causing the test to be skipped) if multilib flags include -mfpu= with a value other than neon-fp16. Tested on arm-none-linux-gnueabi for several multilibs; these tests are compile-only so it didn't matter that I didn't have runtime support for them. OK for trunk and 4.6 branch? 2011-06-07 Janis Johnson * lib/target-supports.exp (check_effective_target_arm_neon_fp16_ok_nocache): Return 0 if multilib flags use -mfpu with a value other than neon-fp16. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 174764) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -1954,6 +1954,11 @@ global et_arm_neon_fp16_flags set et_arm_neon_fp16_flags "" if { [check_effective_target_arm32] } { + # Multilib flags that include -mfpu would override the flags set here; + # skip them. + if [check-flags [list "" { *-*-* } { "-mfpu=*" } { "-mfpu=neon-fp16" } ]] { + return 0 + } # Always add -mfpu=neon-fp16, since there is no preprocessor # macro for FP16 support. foreach flags {"-mfpu=neon-fp16" "-mfpu=neon-fp16 -mfloat-abi=softfp"} {