Patchwork [PR43920,2/9] ARM specific part - test case

login
register
mail settings
Submitter Tom de Vries
Date April 1, 2011, 2:47 p.m.
Message ID <4D95E587.8090404@codesourcery.com>
Download mbox | patch
Permalink /patch/89270/
State New
Headers show

Comments

Tom de Vries - April 1, 2011, 2:47 p.m.
Reposting, with ChangeLog.
Richard Earnshaw - April 1, 2011, 3:34 p.m.
On Fri, 2011-04-01 at 16:47 +0200, Tom de Vries wrote:
> Reposting, with ChangeLog.

+/* { dg-options "-march=armv7-a -mthumb -Os" } */

No, use dg-require-effective-target.  The above doesn't work properly
with multilib testing.

R.

Patch

2011-04-01  Tom de Vries  <tom@codesourcery.com>

	PR target/43920
	* gcc/testsuite/gcc.target/arm/pr43920-1.c: New test.

Index: gcc/testsuite/gcc.target/arm/pr43920-1.c
===================================================================
--- gcc/testsuite/gcc.target/arm/pr43920-1.c	(revision 0)
+++ gcc/testsuite/gcc.target/arm/pr43920-1.c	(revision 0)
@@ -0,0 +1,20 @@ 
+/* { dg-do compile } */
+/* { dg-options "-march=armv7-a -mthumb -Os" } */
+
+int
+f (int start, int end, int *start_)
+{
+  if (start == -1 || end == -1)
+    return -1;
+
+  if (end - start)
+    return -1;
+
+  *start_ = start;
+
+  return 0;
+}
+
+/* { dg-final { scan-assembler-times "\torr" 0 } } */
+/* { dg-final { scan-assembler-times "\tit\t" 0 } } */
+/* { dg-final { scan-assembler "\tbeq" } } */