+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
/* { 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);
/* 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));
/* { 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);
}
char a;
int b;
-foo(char *pt, int *pti)
+int
+foo (char *pt, int *pti)
{
a = 0;
b = 0;
*pti = 0;
}
-rab(char *pt, int *pti)
+int rab (char *pt, int *pti)
{
pt[2] = 0;
pti[3] = 0;
/* { 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;
/* { 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)
{
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)
{
/* { 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));
}