diff mbox

[testsuite] Fix SPARC testsuite gnu11 fallout

Message ID yddppdkqhgv.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Oct. 22, 2014, 2:58 p.m. UTC
A couple of gcc.target/sparc tests were FAILing on Solaris/SPARC due to
the gnu11 change:

FAIL: gcc.target/sparc/20001013-1.c (test for excess errors)
FAIL: gcc.target/sparc/mnofpu.c (test for excess errors)
FAIL: gcc.target/sparc/sparc-ret.c (test for excess errors)
FAIL: gcc.target/sparc/ultrasp6.c (test for excess errors)
FAIL: gcc.target/sparc/ultrasp8.c (test for excess errors)

The following patch fixes them; tested with the appropriate runtest
invocation on sparc-sun-solaris2.11, will commit shortly.

	Rainer


2014-10-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.target/sparc/20001013-1.c (main): Declare int return.
	* gcc.target/sparc/mnofpu.c (e1e_rphy): Declare.
	* gcc.target/sparc/sparc-ret.c (toto): Declare.
	* gcc.target/sparc/ultrasp6.c (__assert, HSRate): Declare.
	* gcc.target/sparc/ultrasp8.c (__malloc_lock, __malloc_unlock):
	Declare.
diff mbox

Patch

# HG changeset patch
# Parent d247af8a6a003c983b5d4fa4315f9b412a8a4094
Fix SPARC testsuite gnu11 fallout

diff --git a/gcc/testsuite/gcc.target/sparc/20001013-1.c b/gcc/testsuite/gcc.target/sparc/20001013-1.c
--- a/gcc/testsuite/gcc.target/sparc/20001013-1.c
+++ b/gcc/testsuite/gcc.target/sparc/20001013-1.c
@@ -31,7 +31,7 @@  union {
   long long l;
 } x = { l: 0x7ff8000000000000LL }, y;
 
-main ()
+int main ()
 {
   unsigned int fsr = 0;
   __asm __volatile ("ld %0, %%fsr" : : "m" (fsr));
diff --git a/gcc/testsuite/gcc.target/sparc/mnofpu.c b/gcc/testsuite/gcc.target/sparc/mnofpu.c
--- a/gcc/testsuite/gcc.target/sparc/mnofpu.c
+++ b/gcc/testsuite/gcc.target/sparc/mnofpu.c
@@ -69,6 +69,7 @@  static inline __attribute__((always_inli
 {
  return __readl(hw->hw_addr + reg);
 }
+int e1e_rphy(struct e1000_hw *, int, u16 *);
 void e1000e_update_stats(struct e1000_adapter *adapter)
 {
  struct e1000_hw *hw = &adapter->hw;
diff --git a/gcc/testsuite/gcc.target/sparc/sparc-ret.c b/gcc/testsuite/gcc.target/sparc/sparc-ret.c
--- a/gcc/testsuite/gcc.target/sparc/sparc-ret.c
+++ b/gcc/testsuite/gcc.target/sparc/sparc-ret.c
@@ -5,6 +5,8 @@ 
 
 /* Make sure that Ultrasparc return insn do not read below the stack.  */
 
+void toto (int *);
+
 int bar (int a, int b, int c, int d, int e, int f, int g, int h)
 {
   int res;
diff --git a/gcc/testsuite/gcc.target/sparc/ultrasp6.c b/gcc/testsuite/gcc.target/sparc/ultrasp6.c
--- a/gcc/testsuite/gcc.target/sparc/ultrasp6.c
+++ b/gcc/testsuite/gcc.target/sparc/ultrasp6.c
@@ -4,6 +4,9 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -mcpu=ultrasparc" } */
 
+void __assert (const char *, const char *, int);
+double HSRate(long, long, long, double, double, int);
+
 typedef struct
 {
   float EnergyErg;
diff --git a/gcc/testsuite/gcc.target/sparc/ultrasp8.c b/gcc/testsuite/gcc.target/sparc/ultrasp8.c
--- a/gcc/testsuite/gcc.target/sparc/ultrasp8.c
+++ b/gcc/testsuite/gcc.target/sparc/ultrasp8.c
@@ -9,6 +9,9 @@  struct _reent;
 extern unsigned long __malloc_trim_threshold;
 extern unsigned long __malloc_top_pad;
 
+void __malloc_lock (void *);
+void __malloc_unlock (void *);
+
 int _mallopt_r(struct _reent *reent_ptr, int param_number, int value)
 {
   __malloc_lock(reent_ptr);