aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2014-10-16 21:40:22 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2014-10-16 21:40:22 +0000
commite4c6530e821ba32c47802cecdb5817995a8b4027 (patch)
tree14203f6d4702eaa49ce53cac9df81962496a96b6 /gcc
parent957f47e6c874633c8a15b93793a314a86c5ab0b1 (diff)
downloadgcc-e4c6530e821ba32c47802cecdb5817995a8b4027.zip
gcc-e4c6530e821ba32c47802cecdb5817995a8b4027.tar.gz
gcc-e4c6530e821ba32c47802cecdb5817995a8b4027.tar.bz2
cmpstr.c: Fix excess failures caused by switch to GNU11.
gcc/testsuite/ * gcc.target/sh/cmpstr.c: Fix excess failures caused by switch to GNU11. * gcc.target/sh/strlen.c: Likewise. * gcc.target/sh/pr51244-13.c: Likewise. * gcc.target/sh/cmpstrn.c: Likewise. * gcc.target/sh/hiconst.c: Likewise. * gcc.target/sh/pr43417.c: Likewise. From-SVN: r216351
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.target/sh/cmpstr.c7
-rw-r--r--gcc/testsuite/gcc.target/sh/cmpstrn.c9
-rw-r--r--gcc/testsuite/gcc.target/sh/hiconst.c5
-rw-r--r--gcc/testsuite/gcc.target/sh/pr43417.c11
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-13.c6
-rw-r--r--gcc/testsuite/gcc.target/sh/strlen.c4
7 files changed, 41 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 13af0867..7f159c6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2014-10-16 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/cmpstr.c: Fix excess failures caused by switch to GNU11.
+ * gcc.target/sh/strlen.c: Likewise.
+ * gcc.target/sh/pr51244-13.c: Likewise.
+ * gcc.target/sh/cmpstrn.c: Likewise.
+ * gcc.target/sh/hiconst.c: Likewise.
+ * gcc.target/sh/pr43417.c: Likewise.
+
2014-10-16 Martin Liska <mliska@suse.cz>
* gcc.dg/guality/pr43077-1.c: IPA ICF disabled
diff --git a/gcc/testsuite/gcc.target/sh/cmpstr.c b/gcc/testsuite/gcc.target/sh/cmpstr.c
index 4d638cc..1b45089 100644
--- a/gcc/testsuite/gcc.target/sh/cmpstr.c
+++ b/gcc/testsuite/gcc.target/sh/cmpstr.c
@@ -7,6 +7,7 @@
/* { dg-final { scan-assembler-times "cmp/str" 3 } } */
/* { dg-final { scan-assembler-times "tst\t#3" 2 } } */
+int
test00 (const char *s1, const char *s2)
{
return __builtin_strcmp (s1, s2);
@@ -14,13 +15,15 @@ test00 (const char *s1, const char *s2)
/* NB: This might change as further optimisation might detect the
max length and fallback to cmpstrn. */
-test01(const char *s2)
+int
+test01 (const char *s2)
{
return __builtin_strcmp ("abc", s2);
}
/* Check that no test for alignment is needed. */
-test03(const char *s1, const char *s2)
+int
+test03 (const char *s1, const char *s2)
{
return __builtin_strcmp (__builtin_assume_aligned (s1, 4),
__builtin_assume_aligned (s2, 4));
diff --git a/gcc/testsuite/gcc.target/sh/cmpstrn.c b/gcc/testsuite/gcc.target/sh/cmpstrn.c
index 3a1d0d1..65cb9d6 100644
--- a/gcc/testsuite/gcc.target/sh/cmpstrn.c
+++ b/gcc/testsuite/gcc.target/sh/cmpstrn.c
@@ -7,19 +7,22 @@
/* { dg-final { scan-assembler-times "cmp/str" 1 } } */
/* Test that cmp/str is not used for small lengths. */
-test01(const char *s1)
+int
+test01 (const char *s1)
{
return __builtin_strncmp (s1, "abcde", 3);
}
/* Test that the cmp/str loop is used. */
-test02(const char *s1)
+int
+test02 (const char *s1)
{
return __builtin_strncmp (s1, "abcdefghi", 8);
}
/* Test that no call is generated */
-test03(const char *s1, int n)
+int
+test03 (const char *s1, int n)
{
return __builtin_strncmp (s1, "abcde", n);
}
diff --git a/gcc/testsuite/gcc.target/sh/hiconst.c b/gcc/testsuite/gcc.target/sh/hiconst.c
index d471d20..778bb8a 100644
--- a/gcc/testsuite/gcc.target/sh/hiconst.c
+++ b/gcc/testsuite/gcc.target/sh/hiconst.c
@@ -4,7 +4,8 @@
char a;
int b;
-foo(char *pt, int *pti)
+int
+foo (char *pt, int *pti)
{
a = 0;
b = 0;
@@ -12,7 +13,7 @@ foo(char *pt, int *pti)
*pti = 0;
}
-rab(char *pt, int *pti)
+int rab (char *pt, int *pti)
{
pt[2] = 0;
pti[3] = 0;
diff --git a/gcc/testsuite/gcc.target/sh/pr43417.c b/gcc/testsuite/gcc.target/sh/pr43417.c
index 081ff46..67b1158 100644
--- a/gcc/testsuite/gcc.target/sh/pr43417.c
+++ b/gcc/testsuite/gcc.target/sh/pr43417.c
@@ -2,11 +2,18 @@
/* { dg-options "-O2 -m4" } */
int pid_count = 0;
-main (int argc, char *argv[])
+
+unsigned int getopt (int, const char**, const char*);
+unsigned long long atoll (const char*);
+int fork (void);
+void kill (int, int);
+
+int
+main (int argc, const char *argv[])
{
unsigned int c;
unsigned long long maxbytes = 0;
- extern char *optarg;
+ extern const char *optarg;
int i;
int pid_cntr;
int pid;
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-13.c b/gcc/testsuite/gcc.target/sh/pr51244-13.c
index 41d23eb..f9a851d 100644
--- a/gcc/testsuite/gcc.target/sh/pr51244-13.c
+++ b/gcc/testsuite/gcc.target/sh/pr51244-13.c
@@ -13,6 +13,10 @@
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
/* { dg-final { scan-assembler-times "tst" 2 } } */
+void printk (const char*, const char*, int);
+void __constant_set_bit (int, unsigned long int*);
+void __set_bit (int, unsigned long int*);
+
static __inline__ int
__test_bit (unsigned long nr, volatile void * addr)
{
@@ -32,6 +36,8 @@ struct list_head
struct list_head *next, *prev;
};
+void list_add (struct list_head*, struct list_head*);
+
static inline void
__list_del (struct list_head *prev, struct list_head *next)
{
diff --git a/gcc/testsuite/gcc.target/sh/strlen.c b/gcc/testsuite/gcc.target/sh/strlen.c
index 115baba..7f2d519 100644
--- a/gcc/testsuite/gcc.target/sh/strlen.c
+++ b/gcc/testsuite/gcc.target/sh/strlen.c
@@ -7,13 +7,15 @@
/* { dg-final { scan-assembler-times "cmp/str" 2 } } */
/* { dg-final { scan-assembler-times "tst\t#3" 1 } } */
+int
test00 (const char *s1)
{
return __builtin_strlen (s1);
}
/* Check that no test for alignment is needed. */
-test03(const char *s1)
+int
+test03 (const char *s1)
{
return __builtin_strlen (__builtin_assume_aligned (s1, 4));
}