diff mbox

[testsuite] fix to gcc.target/arm/sync-1.c

Message ID 4D9F24FB.7060901@codesourcery.com
State New
Headers show

Commit Message

Janis Johnson April 8, 2011, 3:08 p.m. UTC
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  <janisjo@codesourcery.com>

	* gcc.target/arm/sync-1.c: Limit to sync_int_long, do not use
	-march option.

Comments

Ramana Radhakrishnan April 12, 2011, 8:19 p.m. UTC | #1
On 8 April 2011 16:08, Janis Johnson <janisjo@codesourcery.com> wrote:
> 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.

This is OK.


Ramana
>
diff mbox

Patch

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;