From patchwork Fri Apr 8 15:08:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 90381 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 56408B6F7C for ; Sat, 9 Apr 2011 01:08:54 +1000 (EST) Received: (qmail 29598 invoked by alias); 8 Apr 2011 15:08:52 -0000 Received: (qmail 29585 invoked by uid 22791); 8 Apr 2011 15:08:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00, 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; Fri, 08 Apr 2011 15:08:48 +0000 Received: (qmail 5267 invoked from network); 8 Apr 2011 15:08:48 -0000 Received: from unknown (HELO ?192.168.1.5?) (janisjo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Apr 2011 15:08:48 -0000 Message-ID: <4D9F24FB.7060901@codesourcery.com> Date: Fri, 08 Apr 2011 08:08:43 -0700 From: Janis Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [testsuite] fix to gcc.target/arm/sync-1.c 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 Test gcc.target/arm/sync-1.c specifies -march=armv7-a and fails execution for multilibs whose hardware or simulator doesn't support that architecture. The test uses __sync_fetch_and_add, which GCC doesn't support for all arm targets. Using the -march option allows it to compile if the multilib options don't conflict, but the test fails at runtime, often with hangs, if the simulator used for testing doesn't support atomic builtins. This patch removes the -march option and restricts the test to targets that support atomic builtins. I don't yet have an FSF copyright assignment (it's currently in the hands of the FSF) but this patch is small enough to not require one. If this is OK someone else will need to appy it. 2011-04-08 Janis Johnson * gcc.target/arm/sync-1.c: Limit to sync_int_long, do not use -march option. Index: gcc/testsuite/gcc.target/arm/sync-1.c =================================================================== --- gcc/testsuite/gcc.target/arm/sync-1.c (revision 320350) +++ gcc/testsuite/gcc.target/arm/sync-1.c (working copy) @@ -1,5 +1,5 @@ -/* { dg-do run } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-do run { target sync_int_long } } */ +/* { dg-options "-O2" } */ volatile int mem;