This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][SH] Fix sh4a-memmovua.c and sh4a-bitmovua.c gcc tests


The attached patches fix up two SH4A specific test cases that are currently broken.

sh4a-memmovua.c

This test includes the wrong header. This leads to undeclared function warnings and fails the test for excess errors.

sh4a-bitmovua.c

This uses names reserved by the C standard library. This is not a problem, in this case, but leads to warnings, and a failure of the test for excess errors.

OK?

Andrew
2009-02-11  Andrew Stubbs  <ams@codesourcery.com>

	gcc/testsuite/
	* gcc.target/sh/sh4a-bitmovua.c (y0): Rename to y_0 to avoid a clash
	with the built-in y0, and the subsequent warning.
	(y1): Likewise, rename to y_1.

---
 src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Index: src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
===================================================================
--- src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c.orig
+++ src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
@@ -35,15 +35,15 @@ long long f4() {
 }
 
 /* Aligned.  */
-struct u0 { unsigned long long d : 32; } y0;
+struct u0 { unsigned long long d : 32; } y_0;
 unsigned long long g0() {
-  return y0.d;
+  return y_0.d;
 }
 
 /* Unaligned load.  */
-struct u1 { long long c : 8; unsigned long long d : 32; } y1;
+struct u1 { long long c : 8; unsigned long long d : 32; } y_1;
 unsigned long long g1() {
-  return y1.d;
+  return y_1.d;
 }
 
 /* Unaligned load.  */
2009-02-11  Andrew Stubbs  <ams@codesourcery.com>

	gcc/testsuite/
	* gcc.target/sh/sh4a-memmovua.c: Include string.h instead of stdlib.h.

---
 src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c
===================================================================
--- src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c.orig
+++ src/gcc-mainline/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c
@@ -5,7 +5,7 @@
 /* { dg-final { scan-assembler-times "\tmovua\\.l\t(.*)+" 2 } } */
 
 #ifdef __SH4A__
-#include <stdlib.h>
+#include <string.h>
 
 struct s { int i; char a[10], b[10]; } x;
 int f() {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]