Marek Polacek
2014-10-07 17:28:32 UTC
Some more cleanups revealed by testing on ppc64.
Applying to trunk.
2014-10-07 Marek Polacek <***@redhat.com>
* gcc.dg/guality/pr41616-1.c: Use -fgnu89-inline.
* gcc.dg/iftrap-1.c: Fix implicit declarations.
* gcc.target/powerpc/pr26350.c: Likewise.
* gcc.target/powerpc/altivec-consts.c: Likewise.
* gcc.target/powerpc/altivec-varargs-1.c: Likewise.
* gcc.target/powerpc/le-altivec-consts.c: Likewise.
* gcc.target/powerpc/ppc-vector-memcpy.c: Likewise.
* gcc.target/powerpc/ppc-vector-memset.c: Likewise.
* gcc.target/powerpc/pr47862.c: Likewise.
* gcc.target/powerpc/pr48053-1.c: Likewise.
* gcc.target/powerpc/pr53487.c: Likewise.
* gcc.dg/vect/pr48765.c: Fix implicit declarations and defaulting
to int.
* gcc.target/powerpc/20050603-1.c: Fix defaulting to int.
* gcc.target/powerpc/altivec-2.c: Likewise.
* gcc.target/powerpc/pr47755-2.c: Likewise.
diff --git gcc/testsuite/gcc.dg/guality/pr41616-1.c gcc/testsuite/gcc.dg/guality/pr41616-1.c
index 24f64ab..fcd1ad5 100644
--- gcc/testsuite/gcc.dg/guality/pr41616-1.c
+++ gcc/testsuite/gcc.dg/guality/pr41616-1.c
@@ -1,5 +1,5 @@
/* { dg-do run { xfail *-*-* } } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fgnu89-inline" } */
#include "guality.h"
diff --git gcc/testsuite/gcc.dg/iftrap-1.c gcc/testsuite/gcc.dg/iftrap-1.c
index 1427820..c6d5584 100644
--- gcc/testsuite/gcc.dg/iftrap-1.c
+++ gcc/testsuite/gcc.dg/iftrap-1.c
@@ -3,6 +3,8 @@
/* { dg-do compile { target rs6000-*-* powerpc*-*-* sparc*-*-* ia64-*-* } } */
/* { dg-final { scan-assembler-not "^\t(trap|ta|break)\[ \t\]" } } */
+void bar (void);
+
void f1(int p)
{
if (p)
diff --git gcc/testsuite/gcc.dg/vect/pr48765.c gcc/testsuite/gcc.dg/vect/pr48765.c
index 50839e3..2b2907b 100644
--- gcc/testsuite/gcc.dg/vect/pr48765.c
+++ gcc/testsuite/gcc.dg/vect/pr48765.c
@@ -33,8 +33,10 @@ static char *regs_change_size;
static HARD_REG_SET *after_insn_hard_regs;
static int stupid_find_reg (int, enum reg_class, enum machine_mode, int, int,
int);
+enum reg_class reg_preferred_class (int);
void
stupid_life_analysis (f, nregs, file)
+ int nregs, file;
rtx f;
{
register int i;
@@ -52,7 +54,7 @@ stupid_life_analysis (f, nregs, file)
static int
stupid_find_reg (call_preserved, class, mode, born_insn, dead_insn,
changes_size)
- int call_preserved;
+ int call_preserved, born_insn, dead_insn, changes_size;
enum reg_class class;
enum machine_mode mode;
{
diff --git gcc/testsuite/gcc.target/powerpc/20050603-1.c gcc/testsuite/gcc.target/powerpc/20050603-1.c
index 041551b..f801c43 100644
--- gcc/testsuite/gcc.target/powerpc/20050603-1.c
+++ gcc/testsuite/gcc.target/powerpc/20050603-1.c
@@ -15,6 +15,7 @@ test_reg_save_restore (int *p)
setlocale (LC_ALL, "C");
testreg = ext_func(p);
}
+int
main() {
testreg = &x;
test_reg_save_restore (&y);
diff --git gcc/testsuite/gcc.target/powerpc/altivec-2.c gcc/testsuite/gcc.target/powerpc/altivec-2.c
index 4f341dd..a91ac0c 100644
--- gcc/testsuite/gcc.target/powerpc/altivec-2.c
+++ gcc/testsuite/gcc.target/powerpc/altivec-2.c
@@ -23,6 +23,7 @@ int xxx[sizeof(foobar) == 16 ? 69 : -1];
int nc17[sizeof(shoe) == sizeof (char *) ? 69 : -1];
+void
code ()
{
*shoe = polish;
diff --git gcc/testsuite/gcc.target/powerpc/altivec-consts.c gcc/testsuite/gcc.target/powerpc/altivec-consts.c
index 2afd13f..36cb60c 100644
--- gcc/testsuite/gcc.target/powerpc/altivec-consts.c
+++ gcc/testsuite/gcc.target/powerpc/altivec-consts.c
@@ -6,6 +6,7 @@
/* Check that "easy" AltiVec constants are correctly synthesized. */
extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
typedef __attribute__ ((vector_size (16))) unsigned char v16qi;
typedef __attribute__ ((vector_size (16))) unsigned short v8hi;
diff --git gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c
index 1349ae5..d62f5bb 100644
--- gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c
+++ gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c
@@ -7,6 +7,7 @@
extern void exit (int);
extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
#define vector __attribute__((vector_size (16)))
diff --git gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
index 75733d6..15ec650 100644
--- gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
+++ gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
@@ -6,6 +6,7 @@
/* Check that "easy" AltiVec constants are correctly synthesized. */
extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
typedef __attribute__ ((vector_size (16))) unsigned char v16qi;
typedef __attribute__ ((vector_size (16))) unsigned short v8hi;
diff --git gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
index 7d4207f..7464625 100644
--- gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
+++ gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
@@ -5,6 +5,8 @@
#include <string.h>
+void bar (int *);
+
void foo(void)
{
extern int x[8] __attribute__((aligned(128)));
diff --git gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
index ad7aade..175a756 100644
--- gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
+++ gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
@@ -5,6 +5,8 @@
#include <string.h>
+void bar (int *);
+
void foo(void)
{
int x[8] __attribute__((aligned(128)));
diff --git gcc/testsuite/gcc.target/powerpc/pr26350.c gcc/testsuite/gcc.target/powerpc/pr26350.c
index 6b4b206..ee08160 100644
--- gcc/testsuite/gcc.target/powerpc/pr26350.c
+++ gcc/testsuite/gcc.target/powerpc/pr26350.c
@@ -17,6 +17,7 @@ struct REGS {
struct ebfp {
long double v;
};
+void put_ebfp (struct ebfp *);
void s390_convert_fix32_to_bfp_ext_reg (REGS *regs)
{
diff --git gcc/testsuite/gcc.target/powerpc/pr47755-2.c gcc/testsuite/gcc.target/powerpc/pr47755-2.c
index 5edcc11..739eab8 100644
--- gcc/testsuite/gcc.target/powerpc/pr47755-2.c
+++ gcc/testsuite/gcc.target/powerpc/pr47755-2.c
@@ -22,9 +22,9 @@ extern void abort (void) __attribute__((__noreturn__));
#define FAIL_I(A, B, C, D) abort ()
#endif
-static test_ll (vector long long, long long, long long) __attribute__((__noinline__));
+static void test_ll (vector long long, long long, long long) __attribute__((__noinline__));
-static
+static void
test_ll (vector long long v, long long a, long long b)
{
union {
@@ -39,9 +39,9 @@ test_ll (vector long long v, long long a, long long b)
#define TEST_LL(A,B) test_ll ((vector long long){ (A), (B) }, (A), (B))
-static test_i (vector int, int, int, int, int) __attribute__((__noinline__));
+static void test_i (vector int, int, int, int, int) __attribute__((__noinline__));
-static
+static void
test_i (vector int v, int a, int b, int c, int d)
{
union {
diff --git gcc/testsuite/gcc.target/powerpc/pr47862.c gcc/testsuite/gcc.target/powerpc/pr47862.c
index 528cace..2a49f39 100644
--- gcc/testsuite/gcc.target/powerpc/pr47862.c
+++ gcc/testsuite/gcc.target/powerpc/pr47862.c
@@ -7,6 +7,7 @@
/* PR 47862: Verify caller-save spill of vectors in FP regs do not use
legacy FP insns, which spill only half the vector. */
extern vector double dd[15];
+void bar (void);
vector double foo() {
vector double a,b,c,d,e,f,g,h,i,j,k,l,m,n;
diff --git gcc/testsuite/gcc.target/powerpc/pr48053-1.c gcc/testsuite/gcc.target/powerpc/pr48053-1.c
index fd7cd3d..9c6479b 100644
--- gcc/testsuite/gcc.target/powerpc/pr48053-1.c
+++ gcc/testsuite/gcc.target/powerpc/pr48053-1.c
@@ -6,6 +6,7 @@
int sourcenode;
int ARCHelems;
int *source_elms;
+void vv12x12 (double *, double *, double *);
void
foo (int argc, char **argv)
{
diff --git gcc/testsuite/gcc.target/powerpc/pr53487.c gcc/testsuite/gcc.target/powerpc/pr53487.c
index 3e8265b..aa411a3 100644
--- gcc/testsuite/gcc.target/powerpc/pr53487.c
+++ gcc/testsuite/gcc.target/powerpc/pr53487.c
@@ -6,6 +6,7 @@
struct phylo_s {
int left;
};
+void Free2DArray (void **, int);
int Cluster(float **dmx, int N, struct phylo_s *tree)
{
Marek
Applying to trunk.
2014-10-07 Marek Polacek <***@redhat.com>
* gcc.dg/guality/pr41616-1.c: Use -fgnu89-inline.
* gcc.dg/iftrap-1.c: Fix implicit declarations.
* gcc.target/powerpc/pr26350.c: Likewise.
* gcc.target/powerpc/altivec-consts.c: Likewise.
* gcc.target/powerpc/altivec-varargs-1.c: Likewise.
* gcc.target/powerpc/le-altivec-consts.c: Likewise.
* gcc.target/powerpc/ppc-vector-memcpy.c: Likewise.
* gcc.target/powerpc/ppc-vector-memset.c: Likewise.
* gcc.target/powerpc/pr47862.c: Likewise.
* gcc.target/powerpc/pr48053-1.c: Likewise.
* gcc.target/powerpc/pr53487.c: Likewise.
* gcc.dg/vect/pr48765.c: Fix implicit declarations and defaulting
to int.
* gcc.target/powerpc/20050603-1.c: Fix defaulting to int.
* gcc.target/powerpc/altivec-2.c: Likewise.
* gcc.target/powerpc/pr47755-2.c: Likewise.
diff --git gcc/testsuite/gcc.dg/guality/pr41616-1.c gcc/testsuite/gcc.dg/guality/pr41616-1.c
index 24f64ab..fcd1ad5 100644
--- gcc/testsuite/gcc.dg/guality/pr41616-1.c
+++ gcc/testsuite/gcc.dg/guality/pr41616-1.c
@@ -1,5 +1,5 @@
/* { dg-do run { xfail *-*-* } } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fgnu89-inline" } */
#include "guality.h"
diff --git gcc/testsuite/gcc.dg/iftrap-1.c gcc/testsuite/gcc.dg/iftrap-1.c
index 1427820..c6d5584 100644
--- gcc/testsuite/gcc.dg/iftrap-1.c
+++ gcc/testsuite/gcc.dg/iftrap-1.c
@@ -3,6 +3,8 @@
/* { dg-do compile { target rs6000-*-* powerpc*-*-* sparc*-*-* ia64-*-* } } */
/* { dg-final { scan-assembler-not "^\t(trap|ta|break)\[ \t\]" } } */
+void bar (void);
+
void f1(int p)
{
if (p)
diff --git gcc/testsuite/gcc.dg/vect/pr48765.c gcc/testsuite/gcc.dg/vect/pr48765.c
index 50839e3..2b2907b 100644
--- gcc/testsuite/gcc.dg/vect/pr48765.c
+++ gcc/testsuite/gcc.dg/vect/pr48765.c
@@ -33,8 +33,10 @@ static char *regs_change_size;
static HARD_REG_SET *after_insn_hard_regs;
static int stupid_find_reg (int, enum reg_class, enum machine_mode, int, int,
int);
+enum reg_class reg_preferred_class (int);
void
stupid_life_analysis (f, nregs, file)
+ int nregs, file;
rtx f;
{
register int i;
@@ -52,7 +54,7 @@ stupid_life_analysis (f, nregs, file)
static int
stupid_find_reg (call_preserved, class, mode, born_insn, dead_insn,
changes_size)
- int call_preserved;
+ int call_preserved, born_insn, dead_insn, changes_size;
enum reg_class class;
enum machine_mode mode;
{
diff --git gcc/testsuite/gcc.target/powerpc/20050603-1.c gcc/testsuite/gcc.target/powerpc/20050603-1.c
index 041551b..f801c43 100644
--- gcc/testsuite/gcc.target/powerpc/20050603-1.c
+++ gcc/testsuite/gcc.target/powerpc/20050603-1.c
@@ -15,6 +15,7 @@ test_reg_save_restore (int *p)
setlocale (LC_ALL, "C");
testreg = ext_func(p);
}
+int
main() {
testreg = &x;
test_reg_save_restore (&y);
diff --git gcc/testsuite/gcc.target/powerpc/altivec-2.c gcc/testsuite/gcc.target/powerpc/altivec-2.c
index 4f341dd..a91ac0c 100644
--- gcc/testsuite/gcc.target/powerpc/altivec-2.c
+++ gcc/testsuite/gcc.target/powerpc/altivec-2.c
@@ -23,6 +23,7 @@ int xxx[sizeof(foobar) == 16 ? 69 : -1];
int nc17[sizeof(shoe) == sizeof (char *) ? 69 : -1];
+void
code ()
{
*shoe = polish;
diff --git gcc/testsuite/gcc.target/powerpc/altivec-consts.c gcc/testsuite/gcc.target/powerpc/altivec-consts.c
index 2afd13f..36cb60c 100644
--- gcc/testsuite/gcc.target/powerpc/altivec-consts.c
+++ gcc/testsuite/gcc.target/powerpc/altivec-consts.c
@@ -6,6 +6,7 @@
/* Check that "easy" AltiVec constants are correctly synthesized. */
extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
typedef __attribute__ ((vector_size (16))) unsigned char v16qi;
typedef __attribute__ ((vector_size (16))) unsigned short v8hi;
diff --git gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c
index 1349ae5..d62f5bb 100644
--- gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c
+++ gcc/testsuite/gcc.target/powerpc/altivec-varargs-1.c
@@ -7,6 +7,7 @@
extern void exit (int);
extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
#define vector __attribute__((vector_size (16)))
diff --git gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
index 75733d6..15ec650 100644
--- gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
+++ gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
@@ -6,6 +6,7 @@
/* Check that "easy" AltiVec constants are correctly synthesized. */
extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
typedef __attribute__ ((vector_size (16))) unsigned char v16qi;
typedef __attribute__ ((vector_size (16))) unsigned short v8hi;
diff --git gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
index 7d4207f..7464625 100644
--- gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
+++ gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
@@ -5,6 +5,8 @@
#include <string.h>
+void bar (int *);
+
void foo(void)
{
extern int x[8] __attribute__((aligned(128)));
diff --git gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
index ad7aade..175a756 100644
--- gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
+++ gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
@@ -5,6 +5,8 @@
#include <string.h>
+void bar (int *);
+
void foo(void)
{
int x[8] __attribute__((aligned(128)));
diff --git gcc/testsuite/gcc.target/powerpc/pr26350.c gcc/testsuite/gcc.target/powerpc/pr26350.c
index 6b4b206..ee08160 100644
--- gcc/testsuite/gcc.target/powerpc/pr26350.c
+++ gcc/testsuite/gcc.target/powerpc/pr26350.c
@@ -17,6 +17,7 @@ struct REGS {
struct ebfp {
long double v;
};
+void put_ebfp (struct ebfp *);
void s390_convert_fix32_to_bfp_ext_reg (REGS *regs)
{
diff --git gcc/testsuite/gcc.target/powerpc/pr47755-2.c gcc/testsuite/gcc.target/powerpc/pr47755-2.c
index 5edcc11..739eab8 100644
--- gcc/testsuite/gcc.target/powerpc/pr47755-2.c
+++ gcc/testsuite/gcc.target/powerpc/pr47755-2.c
@@ -22,9 +22,9 @@ extern void abort (void) __attribute__((__noreturn__));
#define FAIL_I(A, B, C, D) abort ()
#endif
-static test_ll (vector long long, long long, long long) __attribute__((__noinline__));
+static void test_ll (vector long long, long long, long long) __attribute__((__noinline__));
-static
+static void
test_ll (vector long long v, long long a, long long b)
{
union {
@@ -39,9 +39,9 @@ test_ll (vector long long v, long long a, long long b)
#define TEST_LL(A,B) test_ll ((vector long long){ (A), (B) }, (A), (B))
-static test_i (vector int, int, int, int, int) __attribute__((__noinline__));
+static void test_i (vector int, int, int, int, int) __attribute__((__noinline__));
-static
+static void
test_i (vector int v, int a, int b, int c, int d)
{
union {
diff --git gcc/testsuite/gcc.target/powerpc/pr47862.c gcc/testsuite/gcc.target/powerpc/pr47862.c
index 528cace..2a49f39 100644
--- gcc/testsuite/gcc.target/powerpc/pr47862.c
+++ gcc/testsuite/gcc.target/powerpc/pr47862.c
@@ -7,6 +7,7 @@
/* PR 47862: Verify caller-save spill of vectors in FP regs do not use
legacy FP insns, which spill only half the vector. */
extern vector double dd[15];
+void bar (void);
vector double foo() {
vector double a,b,c,d,e,f,g,h,i,j,k,l,m,n;
diff --git gcc/testsuite/gcc.target/powerpc/pr48053-1.c gcc/testsuite/gcc.target/powerpc/pr48053-1.c
index fd7cd3d..9c6479b 100644
--- gcc/testsuite/gcc.target/powerpc/pr48053-1.c
+++ gcc/testsuite/gcc.target/powerpc/pr48053-1.c
@@ -6,6 +6,7 @@
int sourcenode;
int ARCHelems;
int *source_elms;
+void vv12x12 (double *, double *, double *);
void
foo (int argc, char **argv)
{
diff --git gcc/testsuite/gcc.target/powerpc/pr53487.c gcc/testsuite/gcc.target/powerpc/pr53487.c
index 3e8265b..aa411a3 100644
--- gcc/testsuite/gcc.target/powerpc/pr53487.c
+++ gcc/testsuite/gcc.target/powerpc/pr53487.c
@@ -6,6 +6,7 @@
struct phylo_s {
int left;
};
+void Free2DArray (void **, int);
int Cluster(float **dmx, int N, struct phylo_s *tree)
{
Marek