diff mbox

[testsuite] check before using -mthumb in 5 arm tests

Message ID 53E41A58.5070602@mentor.com
State New
Headers show

Commit Message

Janis Johnson Aug. 8, 2014, 12:31 a.m. UTC
Five tests in gcc.target/arm add -mthumb without first checking that the
option is compatible with the current multilib flags.  This patch fixes
that by skipping each test if neither arm_thumb1_ok or arm_thumb2_ok is
true.  Tested by running gcc.target/arm tests with a variety of multilib
flags, some of which now skip these tests instead of failing to compile.
OK for mainline and the 4.9 branch?

Janis
2013-08-07  Janis Johnson  <janisjo@codesourcery.com>

	* gcc.target/arm/frame-pointer-1.c: Skip if Thumb is not supported.
	* gcc.target/arm/pr56184.C: Likewise.
	* gcc.target/arm/pr59896.c: Likewise.
	* gcc.target/arm/stack-red-zone.c: Likewise.
	* gcc.target/arm/thumb-find-work-register.c: Likewise.

Comments

Richard Earnshaw Aug. 8, 2014, 10:41 a.m. UTC | #1
On 08/08/14 01:31, Janis Johnson wrote:
> Five tests in gcc.target/arm add -mthumb without first checking that the
> option is compatible with the current multilib flags.  This patch fixes
> that by skipping each test if neither arm_thumb1_ok or arm_thumb2_ok is
> true.  Tested by running gcc.target/arm tests with a variety of multilib
> flags, some of which now skip these tests instead of failing to compile.
> OK for mainline and the 4.9 branch?
> 
> Janis
> 
> 
> gcc-20140807-2
> 
> 
> 2013-08-07  Janis Johnson  <janisjo@codesourcery.com>
> 
> 	* gcc.target/arm/frame-pointer-1.c: Skip if Thumb is not supported.
> 	* gcc.target/arm/pr56184.C: Likewise.
> 	* gcc.target/arm/pr59896.c: Likewise.
> 	* gcc.target/arm/stack-red-zone.c: Likewise.
> 	* gcc.target/arm/thumb-find-work-register.c: Likewise.

OK.

R.
diff mbox

Patch

Index: gcc/testsuite/gcc.target/arm/frame-pointer-1.c
===================================================================
--- gcc/testsuite/gcc.target/arm/frame-pointer-1.c	(revision 213683)
+++ gcc/testsuite/gcc.target/arm/frame-pointer-1.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* Check local register variables using a register conventionally 
    used as the frame pointer aren't clobbered under high register pressure.  */
 /* { dg-do run } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
 /* { dg-options "-Os -mthumb -fomit-frame-pointer" } */
 
 #include <stdlib.h>
Index: gcc/testsuite/gcc.target/arm/pr56184.C
===================================================================
--- gcc/testsuite/gcc.target/arm/pr56184.C	(revision 213683)
+++ gcc/testsuite/gcc.target/arm/pr56184.C	(working copy)
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
 /* { dg-options "-fno-short-enums -O2 -mthumb -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mtune=cortex-a9 -fno-section-anchors" } */
 
 typedef unsigned int size_t;
Index: gcc/testsuite/gcc.target/arm/pr59896.c
===================================================================
--- gcc/testsuite/gcc.target/arm/pr59896.c	(revision 213683)
+++ gcc/testsuite/gcc.target/arm/pr59896.c	(working copy)
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
 /* { dg-options "-mthumb -O2" } */
 
 typedef unsigned int size_t;
Index: gcc/testsuite/gcc.target/arm/stack-red-zone.c
===================================================================
--- gcc/testsuite/gcc.target/arm/stack-red-zone.c	(revision 213683)
+++ gcc/testsuite/gcc.target/arm/stack-red-zone.c	(working copy)
@@ -1,4 +1,5 @@ 
 /* No stack red zone.  PR38644.  */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
 /* { dg-options "-mthumb -O2" } */
 /* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp" } } */
 
Index: gcc/testsuite/gcc.target/arm/thumb-find-work-register.c
===================================================================
--- gcc/testsuite/gcc.target/arm/thumb-find-work-register.c	(revision 213683)
+++ gcc/testsuite/gcc.target/arm/thumb-find-work-register.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* Wrong method to get number of arg reg will cause argument corruption.  */
 /* { dg-do run } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
 /* { dg-require-effective-target arm_eabi } */
 /* { dg-options "-mthumb -O1" } */