aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/20011127-1.c30
-rw-r--r--gcc/testsuite/gcc.dg/20020620-1.c7
-rw-r--r--gcc/testsuite/gcc.dg/20020926-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/20021014-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20030123-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/20030129-1.c37
-rw-r--r--gcc/testsuite/gcc.dg/20040305-1.c53
-rw-r--r--gcc/testsuite/gcc.dg/20041109-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/20041216-1.c23
-rw-r--r--gcc/testsuite/gcc.dg/20050111-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/20050409-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/20050503-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20050524-1.c34
-rw-r--r--gcc/testsuite/gcc.dg/20050824-1.c34
-rw-r--r--gcc/testsuite/gcc.dg/20051215-1.c36
-rw-r--r--gcc/testsuite/gcc.dg/20060801-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20061127-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/arm-asm.c2
-rw-r--r--gcc/testsuite/gcc.dg/arm-eabi1.c337
-rw-r--r--gcc/testsuite/gcc.dg/array-init-1.c24
-rw-r--r--gcc/testsuite/gcc.dg/array-init-2.c51
-rw-r--r--gcc/testsuite/gcc.dg/asmreg-1.c73
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_size.c4
-rw-r--r--gcc/testsuite/gcc.dg/attr-isr-trap_exit.c2
-rw-r--r--gcc/testsuite/gcc.dg/bfin-longcall-1.c33
-rw-r--r--gcc/testsuite/gcc.dg/bfin-longcall-2.c33
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/cast-lvalue-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-12.c69
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/const-compare.c29
-rw-r--r--gcc/testsuite/gcc.dg/const-float128-ped.c2
-rw-r--r--gcc/testsuite/gcc.dg/const-float128.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/empty-include.c2
-rw-r--r--gcc/testsuite/gcc.dg/cris-peep2-andu1.c42
-rw-r--r--gcc/testsuite/gcc.dg/cris-peep2-andu2.c32
-rw-r--r--gcc/testsuite/gcc.dg/cris-peep2-xsrand.c32
-rw-r--r--gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c34
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr31344.c (renamed from gcc/testsuite/gcc.dg/pr31344.c)2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr31385.c30
-rw-r--r--gcc/testsuite/gcc.dg/fold-eqandshift-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/h8300-ice2.c2
-rw-r--r--gcc/testsuite/gcc.dg/i386-darwin-fpmath.c9
-rw-r--r--gcc/testsuite/gcc.dg/ifelse-2.c34
-rw-r--r--gcc/testsuite/gcc.dg/inline-24.c28
-rw-r--r--gcc/testsuite/gcc.dg/m68k-pic-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/m68k-slp-ice.c15
-rw-r--r--gcc/testsuite/gcc.dg/nest.c2
-rw-r--r--gcc/testsuite/gcc.dg/nested-func-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/non-lazy-ptr-test.c40
-rw-r--r--gcc/testsuite/gcc.dg/pr20927.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr21255-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr21255-2-mb.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr21255-2-ml.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr21255-3.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr21255-4.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr24624.c67
-rw-r--r--gcc/testsuite/gcc.dg/pr27661.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr30744-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr32328.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr32370.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr32450.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr32573.c30
-rw-r--r--gcc/testsuite/gcc.dg/pr32721.c2
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c2
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr.c2
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr2.c2
-rw-r--r--gcc/testsuite/gcc.dg/rs6000-leaf.c8
-rw-r--r--gcc/testsuite/gcc.dg/sh-relax-vxworks.c5
-rw-r--r--gcc/testsuite/gcc.dg/sh-relax.c41
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-bitmovua.c73
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-cos.c13
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-cosf.c13
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-fprun.c37
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-fsrra.c13
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-memmovua.c17
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-sin.c13
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-sincos.c14
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-sincosf.c14
-rw-r--r--gcc/testsuite/gcc.dg/sh4a-sinf.c13
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/sms-1.c38
-rw-r--r--gcc/testsuite/gcc.dg/symbian1.c11
-rw-r--r--gcc/testsuite/gcc.dg/symbian2.c10
-rw-r--r--gcc/testsuite/gcc.dg/symbian3.c7
-rw-r--r--gcc/testsuite/gcc.dg/symbian4.c5
-rw-r--r--gcc/testsuite/gcc.dg/symbian5.c8
-rw-r--r--gcc/testsuite/gcc.dg/sync-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/sync-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-5.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/foldaddr-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr26421.c2
-rw-r--r--gcc/testsuite/gcc.dg/unsigned-long-compare.c2
106 files changed, 432 insertions, 1618 deletions
diff --git a/gcc/testsuite/gcc.dg/20011127-1.c b/gcc/testsuite/gcc.dg/20011127-1.c
deleted file mode 100644
index ab781241a6d..00000000000
--- a/gcc/testsuite/gcc.dg/20011127-1.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2001, 2007 Free Software Foundation.
- by Hans-Peter Nilsson <hp@axis.com>
-
- Making sure that invalid asm operand modifiers don't cause an ICE. */
-
-/* { dg-do compile { target cris-*-* } } */
-/* { dg-options "-O2" } */
-/* { dg-message "reg:SI|const_double:DF" "prune debug_rtx output" { target cris-*-* } 0 } */
-
-void
-foo (void)
-{
- /* The first case symbolizes the default case for CRIS. */
- asm ("\n;# %w0" : : "r" (0)); /* { dg-error "modifier" } */
-
- /* These are explicit cases. Luckily, a register is invalid in most of
- them. */
- asm ("\n;# %b0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %v0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %P0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %p0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %z0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %H0" : : "F" (0.5)); /* { dg-error "modifier" } */
- asm ("\n;# %e0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %m0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %A0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %D0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %T0" : : "r" (0)); /* { dg-error "modifier" } */
- /* Add more must-not-ICE asm errors here as we find them ICEing. */
-}
diff --git a/gcc/testsuite/gcc.dg/20020620-1.c b/gcc/testsuite/gcc.dg/20020620-1.c
deleted file mode 100644
index ea6b9d5a74f..00000000000
--- a/gcc/testsuite/gcc.dg/20020620-1.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/* { dg-do compile { target mips64*-*-* mipsisa64*-*-* } } */
-/* { dg-options "-O2 -mlong64" } */
-int foo (int *x, int i)
-{
- return x[i] + i;
-}
-/* { dg-final { scan-assembler-not "move" } } */
diff --git a/gcc/testsuite/gcc.dg/20020926-1.c b/gcc/testsuite/gcc.dg/20020926-1.c
deleted file mode 100644
index 7a8c716dcb2..00000000000
--- a/gcc/testsuite/gcc.dg/20020926-1.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Make sure that LEGITIMIZE_ADDRESS is called to handle
- negative displacements. */
-
-/* { dg-do compile { target s390-*-* } } */
-/* { dg-options "-O2 -mesa" } */
-
-int test (int *addr)
-{
- return *(addr - 1);
-}
-
-/* { dg-final { scan-assembler "-4096" } } */
-/* { dg-final { scan-assembler-not "ahi" } } */
-
diff --git a/gcc/testsuite/gcc.dg/20021014-1.c b/gcc/testsuite/gcc.dg/20021014-1.c
index dd8614c9f09..41aa3c37620 100644
--- a/gcc/testsuite/gcc.dg/20021014-1.c
+++ b/gcc/testsuite/gcc.dg/20021014-1.c
@@ -23,3 +23,5 @@ int main (void)
abort ();
exit (0);
}
+
+/* { dg-final { cleanup-profile-file } } */
diff --git a/gcc/testsuite/gcc.dg/20030123-1.c b/gcc/testsuite/gcc.dg/20030123-1.c
deleted file mode 100644
index 319e4526a4a..00000000000
--- a/gcc/testsuite/gcc.dg/20030123-1.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* This used to ICE due to a reload bug on s390*. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2 -fno-omit-frame-pointer" } */
-
-extern void *alloca (__SIZE_TYPE__);
-
-void func (char *p);
-
-void test (void)
-{
- char *p = alloca (4096);
- long idx;
-
- asm ("" : "=r" (idx) : : "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12");
-
- func (p + idx + 1);
-}
-
diff --git a/gcc/testsuite/gcc.dg/20030129-1.c b/gcc/testsuite/gcc.dg/20030129-1.c
deleted file mode 100644
index 0b745a901b1..00000000000
--- a/gcc/testsuite/gcc.dg/20030129-1.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This used to ICE due to a reload bug on s390*. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2" } */
-
-int f (unsigned int);
-void g (void *);
-
-void test (void *p, void *dummy)
-{
- unsigned int flags = 0;
-
- if (dummy)
- g (dummy);
-
- if (p)
- flags |= 0x80000000;
-
- asm volatile ("" : : : "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
-
- if (dummy)
- g (dummy);
-
- if (p)
- {
- flags |= 0x20000000|0x80000000;
-
- if (!f (0))
- flags &= ~0x80000000;
- }
-
- f (flags);
-
- if (dummy)
- g (dummy);
-}
-
diff --git a/gcc/testsuite/gcc.dg/20040305-1.c b/gcc/testsuite/gcc.dg/20040305-1.c
deleted file mode 100644
index d2c4da4296f..00000000000
--- a/gcc/testsuite/gcc.dg/20040305-1.c
+++ /dev/null
@@ -1,53 +0,0 @@
-
-/* The testcase failed due to corrupted alias information.
- During the crossjump analyzing step the mem alias info of the
- st instructions are merged and get copied during basic block
- reordering which leads to an insn with wrong alias info.
- The scheduler afterwards exchanges the mvc and st instructions
- not recognizing the anti dependence. */
-/* { dg-do run { target s390-*-* } } */
-/* { dg-options "-O3 -mtune=z990 -fno-inline" } */
-
-extern void exit (int);
-extern void abort (void);
-
-int f;
-int g;
-int h;
-
-int* x = &f;
-int* p1 = &g;
-int* p2 = &h;
-
-int
-foo(void)
-{
-
- if (*x == 0)
- {
- x = p1; /* mvc - memory to memory */
- p1 = (int*)0; /* st - register to memory */
- return 1;
- }
- if (*x == 5)
- {
- f = 1;
- g = 2;
-
- p2 = (int*)0; /* st */
- return 1;
- }
-}
-
-int
-main (int argc, char** argv)
-{
- foo ();
-
- /* If the scheduler has exchanged the mvc and st instructions,
- x is 0. The expected result is &g. */
- if (x == &g)
- exit (0);
- else
- abort ();
-}
diff --git a/gcc/testsuite/gcc.dg/20041109-1.c b/gcc/testsuite/gcc.dg/20041109-1.c
deleted file mode 100644
index 8b072339dd8..00000000000
--- a/gcc/testsuite/gcc.dg/20041109-1.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This used to ICE due to a literal pool handling bug on s390x. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2 -fno-omit-frame-pointer" } */
-
-static struct table { int x; } table[3];
-
-int test (void)
-{
- struct table *t;
-
- for (t = table; t < &table[3]; t++)
- asm volatile ("" : : : "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12");
-
- for (t = table; t < &table[3]; t++)
- if (t->x)
- return 1;
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/20041216-1.c b/gcc/testsuite/gcc.dg/20041216-1.c
deleted file mode 100644
index 3f892a2e375..00000000000
--- a/gcc/testsuite/gcc.dg/20041216-1.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This test case would get an unresolved symbol during link
- because stabs referred to an optimized-away literal pool
- entry. */
-
-/* { dg-do run { target s390*-*-* } } */
-/* { dg-options "-O2 -fno-omit-frame-pointer -gstabs" } */
-
-int main (void)
-{
- static char buf[4096];
- char *p;
-
- do
- {
- p = buf;
- asm volatile ("" : : : "memory", "0", "1", "2", "3", "4", "5", "6",
- "7", "8", "9", "10", "12");
- }
- while (*p);
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/20050111-1.c b/gcc/testsuite/gcc.dg/20050111-1.c
index 0cc4b7e195f..7cf04e806d6 100644
--- a/gcc/testsuite/gcc.dg/20050111-1.c
+++ b/gcc/testsuite/gcc.dg/20050111-1.c
@@ -1,10 +1,7 @@
/* PR middle-end/19084, rtl-optimization/19348 */
/* { dg-do compile } */
-/* The following ensures that this test is compiled with -O2, unless
- on i?86 or x86_64 with -m32 option. */
/* { dg-options "-O2" } */
-/* { dg-options "-O2 -march=i686" { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2" { target lp64 } } */
+/* { dg-options "-O2 -march=i686" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
unsigned int
foo (unsigned long long x)
diff --git a/gcc/testsuite/gcc.dg/20050409-1.c b/gcc/testsuite/gcc.dg/20050409-1.c
deleted file mode 100644
index be85f71a6b7..00000000000
--- a/gcc/testsuite/gcc.dg/20050409-1.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* This used to ICE due to a regmove problem on s390. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2" } */
-
-
-extern void abort (void);
-extern void **alloc (void);
-
-void *test (void)
-{
- void **p = alloc ();
- if (!p) abort ();
-
- __builtin_set_thread_pointer (p);
- return *p;
-}
-
diff --git a/gcc/testsuite/gcc.dg/20050503-1.c b/gcc/testsuite/gcc.dg/20050503-1.c
index 1ab93cad7bf..a6c6fa15fa8 100644
--- a/gcc/testsuite/gcc.dg/20050503-1.c
+++ b/gcc/testsuite/gcc.dg/20050503-1.c
@@ -2,7 +2,7 @@
Test whether tail call information is propagated through builtin
expanders. */
/* { dg-do compile } */
-/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } { "*" } { "" } } */
/* { dg-options "-O2" } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/20050524-1.c b/gcc/testsuite/gcc.dg/20050524-1.c
deleted file mode 100644
index f15c51d628a..00000000000
--- a/gcc/testsuite/gcc.dg/20050524-1.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* This test case used to abort due to a reload bug with
- elimination offsets. */
-
-/* { dg-do run { target s390*-*-* } } */
-/* { dg-options "-O2 -mpacked-stack" } */
-
-extern void abort (void);
-
-double bar (double) __attribute__ ((noinline));
-double bar (double x) { return x; }
-
-double
-foo (int j, double f0, double f2, double f4, double f6, double x) __attribute__ ((noinline));
-
-double
-foo (int j, double f0, double f2, double f4, double f6, double x)
-{
- if (j)
- return bar (x) + 4.0;
- else
- return bar (x);
-}
-
-int
-main (void)
-{
- if (foo (0, 0, 0, 0, 0, 10) != 10)
- abort ();
- if (foo (1, 0, 0, 0, 0, 10) != 14)
- abort ();
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/20050824-1.c b/gcc/testsuite/gcc.dg/20050824-1.c
deleted file mode 100644
index 4df79fb6ae7..00000000000
--- a/gcc/testsuite/gcc.dg/20050824-1.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Make sure that the S/390 specific shift_count_operand
- predicate work properly. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O3" } */
-
-unsigned long long
-f (unsigned long long a, unsigned long b)
-{
- asm ("" : : :
-#ifdef __s390x__
- "r13", "r14",
-#endif
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12");
-
- return a << ((b + 3) & 63);
-}
-
-unsigned long long
-g (unsigned long long a, char **b , int c, int d, int e, int f)
-{
- char buffer [4096];
-
- *b = &buffer[0];
-
- return a << ((unsigned long)&f & 63);
-}
-
-unsigned long long
-h (unsigned long long a, int b, int c, int d, int e, int f)
-{
- return a << (((unsigned long)&f + 3));
-}
diff --git a/gcc/testsuite/gcc.dg/20051215-1.c b/gcc/testsuite/gcc.dg/20051215-1.c
deleted file mode 100644
index 0bb06d9be3e..00000000000
--- a/gcc/testsuite/gcc.dg/20051215-1.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ARM's load-and-call patterns used to allow automodified addresses.
- This was wrong, because if the modified register were spilled,
- the call would need an output reload. */
-/* { dg-do run { target arm*-*-* } } */
-/* { dg-options "-O2 -fno-omit-frame-pointer" } */
-extern void abort (void);
-typedef void (*callback) (void);
-
-static void
-foo (callback *first, callback *p)
-{
- while (p > first)
- {
- (*--p) ();
-#ifndef __thumb__
- asm ("" : "=r" (p) : "0" (p)
- : "r4", "r5", "r6", "r7", "r8", "r9", "r10");
-#endif
- }
-}
-
-static void
-dummy (void)
-{
- static int count;
- if (count++ == 1)
- abort ();
-}
-
-int
-main (void)
-{
- callback list[1] = { dummy };
- foo (&list[0], &list[1]);
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/20060801-1.c b/gcc/testsuite/gcc.dg/20060801-1.c
index 26cc7c21d85..c036acbec80 100644
--- a/gcc/testsuite/gcc.dg/20060801-1.c
+++ b/gcc/testsuite/gcc.dg/20060801-1.c
@@ -1,4 +1,5 @@
-/* { dg-do compile { target { lp64 } } } */
+/* { dg-do compile { target fpic } } */
+/* { dg-require-effective-target lp64 } */
/* { dg-options "-fPIC" } */
char *ptr = 0;
char array[100];
diff --git a/gcc/testsuite/gcc.dg/20061127-1.c b/gcc/testsuite/gcc.dg/20061127-1.c
index ec94dc8c3f8..0b70a5ae2b6 100644
--- a/gcc/testsuite/gcc.dg/20061127-1.c
+++ b/gcc/testsuite/gcc.dg/20061127-1.c
@@ -1,4 +1,5 @@
-/* { dg-do compile { target lp64 } } */
+/* { dg-do compile { target fpic } } */
+/* { dg-require-effective-target lp64 } */
/* { dg-options "-O1 -fPIC" } */
/* PR target/29319 */
diff --git a/gcc/testsuite/gcc.dg/arm-asm.c b/gcc/testsuite/gcc.dg/arm-asm.c
index dd99c68553f..1187d9eb466 100644
--- a/gcc/testsuite/gcc.dg/arm-asm.c
+++ b/gcc/testsuite/gcc.dg/arm-asm.c
@@ -1,6 +1,6 @@
/* ARM and Thumb asm statements should be able to access the constant
pool. */
-/* { dg-do compile { target arm*-*-* strongarm*-*-* xscale*-*-*} } */
+/* { dg-do compile { target arm*-*-* strongarm*-*-* xscale*-*-* } } */
extern unsigned x[];
unsigned *trapTable()
{
diff --git a/gcc/testsuite/gcc.dg/arm-eabi1.c b/gcc/testsuite/gcc.dg/arm-eabi1.c
deleted file mode 100644
index 06af6710299..00000000000
--- a/gcc/testsuite/gcc.dg/arm-eabi1.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/* { dg-do run { target arm*-*-symbianelf* arm*-*-eabi* } } */
-/* { dg-options "" } */
-
-/* This file tests most of the non-C++ run-time helper functions
- described in Section 4 of the "Run-Time ABI for the ARM
- Architecture". These are basic tests; they do not try to validate
- all of the corner cases in these routines.
-
- The functions not tested here are:
-
- __aeabi_cdcmpeq
- __aeabi_cdcmple
- __aeabi_cdrcmple
- __aeabi_cfcmpeq
- __aeabi_cfcmple
- __aeabi_cfrcmple
- __aeabi_ldivmod
- __aeabi_uldivmod
- __aeabi_idivmod
- __aeabi_uidivmod
-
- These functions have non-standard calling conventions that would
- require the use of inline assembly to test. It would be good to
- add such tests, but they have not yet been implemented.
-
- There are also no tests for the "division by zero", "memory copying,
- clearing, and setting" functions. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#define decl_float(code, type) \
- extern type __aeabi_ ## code ## add (type, type); \
- extern type __aeabi_ ## code ## div (type, type); \
- extern type __aeabi_ ## code ## mul (type, type); \
- extern type __aeabi_ ## code ## neg (type); \
- extern type __aeabi_ ## code ## rsub (type, type); \
- extern type __aeabi_ ## code ## sub (type, type); \
- extern int __aeabi_ ## code ## cmpeq (type, type); \
- extern int __aeabi_ ## code ## cmplt (type, type); \
- extern int __aeabi_ ## code ## cmple (type, type); \
- extern int __aeabi_ ## code ## cmpge (type, type); \
- extern int __aeabi_ ## code ## cmpgt (type, type); \
- extern int __aeabi_ ## code ## cmpun (type, type); \
- extern int __aeabi_ ## code ## 2iz (type); \
- extern unsigned int __aeabi_ ## code ## 2uiz (type); \
- extern long long __aeabi_ ## code ## 2lz (type); \
- extern unsigned long long __aeabi_ ## code ## 2ulz (type); \
- extern type __aeabi_i2 ## code (int); \
- extern type __aeabi_ui2 ## code (int); \
- extern type __aeabi_l2 ## code (long long); \
- extern type __aeabi_ul2 ## code (unsigned long long); \
- \
- type code ## zero = 0.0; \
- type code ## one = 1.0; \
- type code ## two = 2.0; \
- type code ## four = 4.0; \
- type code ## minus_one = -1.0; \
- type code ## minus_two = -2.0; \
- type code ## minus_four = -4.0; \
- type code ## epsilon = 1E-32; \
- type code ## NaN = 0.0 / 0.0;
-
-decl_float (d, double)
-decl_float (f, float)
-
-extern float __aeabi_d2f (double);
-extern double __aeabi_f2d (float);
-extern long long __aeabi_lmul (long long, long long);
-extern long long __aeabi_llsl (long long, int);
-extern long long __aeabi_llsr (long long, int);
-extern long long __aeabi_lasr (long long, int);
-extern int __aeabi_lcmp (long long, long long);
-extern int __aeabi_ulcmp (unsigned long long, unsigned long long);
-extern int __aeabi_idiv (int, int);
-extern unsigned int __aeabi_uidiv (unsigned int, unsigned int);
-extern int __eabi_uread4 (void *);
-extern int __eabi_uwrite4 (int, void *);
-extern long long __eabi_uread8 (void *);
-extern long long __eabi_uwrite8 (long long, void *);
-
-#define eq(a, b, type, abs, epsilon, format) \
- { \
- type a1; \
- type b1; \
- \
- a1 = a; \
- b1 = b; \
- if (abs (a1 - b1) > epsilon) \
- { \
- fprintf (stderr, "%d: Test %s == %s\n", __LINE__, #a, #b); \
- fprintf (stderr, "%d: " format " != " format "\n", \
- __LINE__, a1, b1); \
- abort (); \
- } \
- }
-
-#define ieq(a, b) eq (a, b, int, abs, 0, "%d")
-#define ueq(a, b) eq (a, b, unsigned int, abs, 0, "%u")
-#define leq(a, b) eq (a, b, long long, abs, 0, "%lld")
-#define uleq(a, b) eq (a, b, unsigned long long, abs, 0, "%llu")
-#define feq(a, b) eq (a, b, float, fabs, fepsilon, "%f")
-#define deq(a, b) eq (a, b, double, fabs, depsilon, "%g")
-
-#define NUM_CMP_VALUES 6
-
-/* Values picked to cover a range of small, large, positive and negative. */
-static unsigned int cmp_val[NUM_CMP_VALUES] =
-{
- 0,
- 1,
- 0x40000000,
- 0x80000000,
- 0xc0000000,
- 0xffffffff
-};
-
-/* All combinations for each of the above values. */
-#define ulcmp(l, s, m) \
- s, l, l, l, l, l, m, s, l, l, l, l, \
- m, m, s, l, l, l, m, m, m, s, l, l, \
- m, m, m, m, s, l, m, m, m, m, m, s
-
-#define lcmp(l, s, m) \
- s, l, l, m, m, m, m, s, l, m, m, m, \
- m, m, s, m, m, m, l, l, l, s, l, l, \
- l, l, l, m, s, l, l, l, l, m, m, s
-
-/* All combinations of the above for high/low words. */
-static int lcmp_results[] =
-{
- lcmp(ulcmp(-1, -1, -1), ulcmp(-1, 0, 1), ulcmp(1, 1, 1))
-};
-
-static int ulcmp_results[] =
-{
- ulcmp(ulcmp(-1, -1, -1), ulcmp(-1, 0, 1), ulcmp(1, 1, 1))
-};
-
-static int signof(int i)
-{
- if (i < 0)
- return -1;
-
- if (i == 0)
- return 0;
-
- return 1;
-}
-
-int main () {
- unsigned char bytes[256];
- int i, j, k, n;
- int *result;
-
- /* Table 2. Double-precision floating-point arithmetic. */
- deq (__aeabi_dadd (dzero, done), done);
- deq (__aeabi_dadd (done, done), dtwo);
- deq (__aeabi_ddiv (dminus_four, dminus_two), dtwo);
- deq (__aeabi_ddiv (dminus_two, dtwo), dminus_one);
- deq (__aeabi_dmul (dtwo, dtwo), dfour);
- deq (__aeabi_dmul (dminus_one, dminus_two), dtwo);
- deq (__aeabi_dneg (dminus_one), done);
- deq (__aeabi_dneg (dfour), dminus_four);
- deq (__aeabi_drsub (done, dzero), dminus_one);
- deq (__aeabi_drsub (dtwo, dminus_two), dminus_four);
- deq (__aeabi_dsub (dzero, done), dminus_one);
- deq (__aeabi_dsub (dminus_two, dtwo), dminus_four);
-
- /* Table 3. Double-precision floating-point comparisons. */
- ieq (__aeabi_dcmpeq (done, done), 1);
- ieq (__aeabi_dcmpeq (done, dzero), 0);
- ieq (__aeabi_dcmpeq (dNaN, dzero), 0);
- ieq (__aeabi_dcmpeq (dNaN, dNaN), 0);
-
- ieq (__aeabi_dcmplt (dzero, done), 1);
- ieq (__aeabi_dcmplt (done, dzero), 0);
- ieq (__aeabi_dcmplt (dzero, dzero), 0);
- ieq (__aeabi_dcmplt (dzero, dNaN), 0);
- ieq (__aeabi_dcmplt (dNaN, dNaN), 0);
-
- ieq (__aeabi_dcmple (dzero, done), 1);
- ieq (__aeabi_dcmple (done, dzero), 0);
- ieq (__aeabi_dcmple (dzero, dzero), 1);
- ieq (__aeabi_dcmple (dzero, dNaN), 0);
- ieq (__aeabi_dcmple (dNaN, dNaN), 0);
-
- ieq (__aeabi_dcmpge (dzero, done), 0);
- ieq (__aeabi_dcmpge (done, dzero), 1);
- ieq (__aeabi_dcmpge (dzero, dzero), 1);
- ieq (__aeabi_dcmpge (dzero, dNaN), 0);
- ieq (__aeabi_dcmpge (dNaN, dNaN), 0);
-
- ieq (__aeabi_dcmpgt (dzero, done), 0);
- ieq (__aeabi_dcmpgt (done, dzero), 1);
- ieq (__aeabi_dcmplt (dzero, dzero), 0);
- ieq (__aeabi_dcmpgt (dzero, dNaN), 0);
- ieq (__aeabi_dcmpgt (dNaN, dNaN), 0);
-
- ieq (__aeabi_dcmpun (done, done), 0);
- ieq (__aeabi_dcmpun (done, dzero), 0);
- ieq (__aeabi_dcmpun (dNaN, dzero), 1);
- ieq (__aeabi_dcmpun (dNaN, dNaN), 1);
-
- /* Table 4. Single-precision floating-point arithmetic. */
- feq (__aeabi_fadd (fzero, fone), fone);
- feq (__aeabi_fadd (fone, fone), ftwo);
- feq (__aeabi_fdiv (fminus_four, fminus_two), ftwo);
- feq (__aeabi_fdiv (fminus_two, ftwo), fminus_one);
- feq (__aeabi_fmul (ftwo, ftwo), ffour);
- feq (__aeabi_fmul (fminus_one, fminus_two), ftwo);
- feq (__aeabi_fneg (fminus_one), fone);
- feq (__aeabi_fneg (ffour), fminus_four);
- feq (__aeabi_frsub (fone, fzero), fminus_one);
- feq (__aeabi_frsub (ftwo, fminus_two), fminus_four);
- feq (__aeabi_fsub (fzero, fone), fminus_one);
- feq (__aeabi_fsub (fminus_two, ftwo), fminus_four);
-
- /* Table 5. Single-precision floating-point comparisons. */
- ieq (__aeabi_fcmpeq (fone, fone), 1);
- ieq (__aeabi_fcmpeq (fone, fzero), 0);
- ieq (__aeabi_fcmpeq (fNaN, fzero), 0);
- ieq (__aeabi_fcmpeq (fNaN, fNaN), 0);
-
- ieq (__aeabi_fcmplt (fzero, fone), 1);
- ieq (__aeabi_fcmplt (fone, fzero), 0);
- ieq (__aeabi_fcmplt (fzero, fzero), 0);
- ieq (__aeabi_fcmplt (fzero, fNaN), 0);
- ieq (__aeabi_fcmplt (fNaN, fNaN), 0);
-
- ieq (__aeabi_fcmple (fzero, fone), 1);
- ieq (__aeabi_fcmple (fone, fzero), 0);
- ieq (__aeabi_fcmple (fzero, fzero), 1);
- ieq (__aeabi_fcmple (fzero, fNaN), 0);
- ieq (__aeabi_fcmple (fNaN, fNaN), 0);
-
- ieq (__aeabi_fcmpge (fzero, fone), 0);
- ieq (__aeabi_fcmpge (fone, fzero), 1);
- ieq (__aeabi_fcmpge (fzero, fzero), 1);
- ieq (__aeabi_fcmpge (fzero, fNaN), 0);
- ieq (__aeabi_fcmpge (fNaN, fNaN), 0);
-
- ieq (__aeabi_fcmpgt (fzero, fone), 0);
- ieq (__aeabi_fcmpgt (fone, fzero), 1);
- ieq (__aeabi_fcmplt (fzero, fzero), 0);
- ieq (__aeabi_fcmpgt (fzero, fNaN), 0);
- ieq (__aeabi_fcmpgt (fNaN, fNaN), 0);
-
- ieq (__aeabi_fcmpun (fone, fone), 0);
- ieq (__aeabi_fcmpun (fone, fzero), 0);
- ieq (__aeabi_fcmpun (fNaN, fzero), 1);
- ieq (__aeabi_fcmpun (fNaN, fNaN), 1);
-
- /* Table 6. Floating-point to integer conversions. */
- ieq (__aeabi_d2iz (dminus_one), -1);
- ueq (__aeabi_d2uiz (done), 1);
- leq (__aeabi_d2lz (dminus_two), -2LL);
- uleq (__aeabi_d2ulz (dfour), 4LL);
- ieq (__aeabi_f2iz (fminus_one), -1);
- ueq (__aeabi_f2uiz (fone), 1);
- leq (__aeabi_f2lz (fminus_two), -2LL);
- uleq (__aeabi_f2ulz (ffour), 4LL);
-
- /* Table 7. Conversions between floating types. */
- feq (__aeabi_d2f (dtwo), ftwo);
- deq (__aeabi_f2d (fminus_four), dminus_four);
-
- /* Table 8. Integer to floating-point conversions. */
- deq (__aeabi_i2d (-1), dminus_one);
- deq (__aeabi_ui2d (2), dtwo);
- deq (__aeabi_l2d (-1), dminus_one);
- deq (__aeabi_ul2d (2ULL), dtwo);
- feq (__aeabi_i2f (-1), fminus_one);
- feq (__aeabi_ui2f (2), ftwo);
- feq (__aeabi_l2f (-1), fminus_one);
- feq (__aeabi_ul2f (2ULL), ftwo);
-
- /* Table 9. Long long functions. */
- leq (__aeabi_lmul (4LL, -1LL), -4LL);
- leq (__aeabi_llsl (2LL, 1), 4LL);
- leq (__aeabi_llsr (-1LL, 63), 1);
- leq (__aeabi_lasr (-1LL, 63), -1);
-
- result = lcmp_results;
- for (i = 0; i < NUM_CMP_VALUES; i++)
- for (j = 0; j < NUM_CMP_VALUES; j++)
- for (k = 0; k < NUM_CMP_VALUES; k++)
- for (n = 0; n < NUM_CMP_VALUES; n++)
- {
- ieq (signof (__aeabi_lcmp
- (((long long)cmp_val[i] << 32) | cmp_val[k],
- ((long long)cmp_val[j] << 32) | cmp_val[n])),
- *result);
- result++;
- }
- result = ulcmp_results;
- for (i = 0; i < NUM_CMP_VALUES; i++)
- for (j = 0; j < NUM_CMP_VALUES; j++)
- for (k = 0; k < NUM_CMP_VALUES; k++)
- for (n = 0; n < NUM_CMP_VALUES; n++)
- {
- ieq (signof (__aeabi_ulcmp
- (((long long)cmp_val[i] << 32) | cmp_val[k],
- ((long long)cmp_val[j] << 32) | cmp_val[n])),
- *result);
- result++;
- }
-
- ieq (__aeabi_idiv (-550, 11), -50);
- ueq (__aeabi_uidiv (4000000000U, 1000000U), 4000U);
-
- for (i = 0; i < 256; i++)
- bytes[i] = i;
-
-#ifdef __ARMEB__
- ieq (__aeabi_uread4 (bytes + 1), 0x01020304U);
- leq (__aeabi_uread8 (bytes + 3), 0x030405060708090aLL);
- ieq (__aeabi_uwrite4 (0x66778899U, bytes + 5), 0x66778899U);
- leq (__aeabi_uwrite8 (0x2030405060708090LL, bytes + 15),
- 0x2030405060708090LL);
-#else
- ieq (__aeabi_uread4 (bytes + 1), 0x04030201U);
- leq (__aeabi_uread8 (bytes + 3), 0x0a09080706050403LL);
- ieq (__aeabi_uwrite4 (0x99887766U, bytes + 5), 0x99887766U);
- leq (__aeabi_uwrite8 (0x9080706050403020LL, bytes + 15),
- 0x9080706050403020LL);
-#endif
-
- for (i = 0; i < 4; i++)
- ieq (bytes[5 + i], (6 + i) * 0x11);
-
- for (i = 0; i < 8; i++)
- ieq (bytes[15 + i], (2 + i) * 0x10);
-
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/array-init-1.c b/gcc/testsuite/gcc.dg/array-init-1.c
new file mode 100644
index 00000000000..8b866cca3f3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/array-init-1.c
@@ -0,0 +1,24 @@
+/* Test that both arrays are initialized by store_by_pieces. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct A { char c[10]; };
+extern void baz (struct A *);
+
+void
+foo (void)
+{
+ struct A a = { "abcdefghi" };
+ baz (&a);
+}
+
+void
+bar (void)
+{
+ struct A a;
+ __builtin_strcpy (&a.c[0], "abcdefghi");
+ baz (&a);
+}
+
+/* { dg-final { scan-assembler-not "abcdefghi" { target i?86-*-* x86_64-*-* ia64-*-* } } } */
+/* { dg-final { scan-assembler-times "7523094288207667809\|6867666564636261\|1684234849\|64636261" 2 { target i?86-*-* x86_64-*-* ia64-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/array-init-2.c b/gcc/testsuite/gcc.dg/array-init-2.c
new file mode 100644
index 00000000000..9c425818fe5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/array-init-2.c
@@ -0,0 +1,51 @@
+/* Test array initializion by store_by_pieces. */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+struct A { char c[10]; };
+extern void abort (void);
+
+void
+__attribute__((noinline))
+check (struct A * a, int b)
+{
+ const char *p;
+ switch (b)
+ {
+ case 0:
+ p = "abcdefghi";
+ break;
+ case 1:
+ p = "j\0\0\0\0\0\0\0\0";
+ break;
+ case 2:
+ p = "kl\0\0\0\0\0\0\0";
+ break;
+ case 3:
+ p = "mnop\0\0\0\0\0";
+ break;
+ case 4:
+ p = "qrstuvwx\0";
+ break;
+ default:
+ abort ();
+ }
+ if (__builtin_memcmp (a->c, p, 10) != 0)
+ abort ();
+}
+
+int
+main (void)
+{
+ struct A a = { "abcdefghi" };
+ check (&a, 0);
+ struct A b = { "j" };
+ check (&b, 1);
+ struct A c = { "kl" };
+ check (&c, 2);
+ struct A d = { "mnop" };
+ check (&d, 3);
+ struct A e = { "qrstuvwx" };
+ check (&e, 4);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/asmreg-1.c b/gcc/testsuite/gcc.dg/asmreg-1.c
deleted file mode 100644
index 85827e9a9a3..00000000000
--- a/gcc/testsuite/gcc.dg/asmreg-1.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* { dg-do compile { target cris-*-* } } */
-/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler "\\\.ifnc \\\$r9-\\\$r10-\\\$r11-\\\$r12" } } */
-
-/* Sanity check for asm register operands in syscall failed for
- cris-axis-linux-gnu due to regmove bug.
- Hans-Peter Nilsson <hp@axis.com>. */
-
-extern void lseek64 (int, long long, int);
-extern int *__errno_location (void);
-struct dirent64
-{
- long long d_off;
- unsigned short int d_reclen;
- char d_name[256];
-};
-struct kernel_dirent64
-{
- long long d_off;
- unsigned short d_reclen;
- char d_name[256];
-};
-
-static inline int __attribute__ ((__always_inline__))
-__syscall_getdents64 (int fd, char * dirp, unsigned count)
-{
- register unsigned long __sys_res asm ("r10");
- register unsigned long __r10 __asm__ ("r10") = (unsigned long) fd;
- register unsigned long __r11 __asm__ ("r11") = (unsigned long) dirp;
- register unsigned long __r12 __asm__ ("r12") = (unsigned long) count;
- register unsigned long __callno asm ("r9") = (220);
- asm volatile (".ifnc %1-%0-%3-%4,$r9-$r10-$r11-$r12\n\t"
- ".err\n\t"
- ".endif\n\t"
- "break 13"
- : "=r" (__sys_res)
- : "r" (__callno), "0" (__r10), "r" (__r11), "r" (__r12)
- : "memory");
- if (__sys_res >= (unsigned long) -4096)
- {
- (*__errno_location ()) = - __sys_res;
- __sys_res = -1;
- }
- return __sys_res;
-}
-
-int
-__getdents64 (int fd, char *buf, unsigned nbytes)
-{
- struct dirent64 *dp;
- long long last_offset = -1;
- int retval;
- struct kernel_dirent64 *skdp, *kdp;
- dp = (struct dirent64 *) buf;
- skdp = kdp = __builtin_alloca (nbytes);
- retval = __syscall_getdents64(fd, (char *)kdp, nbytes);
- if (retval == -1)
- return -1;
- while ((char *) kdp < (char *) skdp + retval)
- {
- if ((char *) dp > buf + nbytes)
- {
- lseek64(fd, last_offset, 0);
- break;
- }
- last_offset = kdp->d_off;
- __builtin_memcpy (dp->d_name, kdp->d_name, kdp->d_reclen - 10);
- dp = (struct dirent64 *) ((char *) dp + sizeof (*dp));
- kdp = (struct kernel_dirent64 *) (((char *) kdp) + kdp->d_reclen);
- }
-
- return (char *) dp - buf;
-}
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size.c b/gcc/testsuite/gcc.dg/attr-alloc_size.c
index e646e5e3f7f..47d7c005085 100644
--- a/gcc/testsuite/gcc.dg/attr-alloc_size.c
+++ b/gcc/testsuite/gcc.dg/attr-alloc_size.c
@@ -23,13 +23,13 @@ test (void)
p = malloc1 (6);
strcpy (p, "Hello");
strcpy (p, "Hello World"); /* { dg-warning "will always overflow" "strcpy" } */
- p = malloc2 (424242, 6);
+ p = malloc2 (__INT_MAX__ >= 1700000 ? 424242 : __INT_MAX__ / 4, 6);
strcpy (p, "World");
strcpy (p, "Hello World"); /* { dg-warning "will always overflow" "strcpy" } */
p = calloc1 (2, 5);
strcpy (p, "World");
strcpy (p, "Hello World"); /* { dg-warning "will always overflow" "strcpy" } */
- p = calloc2 (2, 424242, 5);
+ p = calloc2 (2, __INT_MAX__ >= 1700000 ? 424242 : __INT_MAX__ / 4, 5);
strcpy (p, "World");
strcpy (p, "Hello World"); /* { dg-warning "will always overflow" "strcpy" } */
}
diff --git a/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c b/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c
index 880db37ce73..7ea24c494f0 100644
--- a/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c
+++ b/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target sh-*-* sh[1234ble]*-*-* } } */
/* { dg-options "-O" } */
/* Check that trapa / interrput_handler attributes can paired in
either order. */
diff --git a/gcc/testsuite/gcc.dg/bfin-longcall-1.c b/gcc/testsuite/gcc.dg/bfin-longcall-1.c
deleted file mode 100644
index 138707e9e3f..00000000000
--- a/gcc/testsuite/gcc.dg/bfin-longcall-1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* { dg-do compile { target bfin-*-* } } */
-/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-not "call\[^\\n\]*foo" } } */
-/* { dg-final { scan-assembler-not "jump\[^\\n\]*foo" } } */
-/* { dg-final { scan-assembler "call\[^\\n\]*baz" } } */
-/* { dg-final { scan-assembler "jump\[^\\n\]*baz" } } */
-/* { dg-final { scan-assembler "call\[^\\n\]*bar" } } */
-/* { dg-final { scan-assembler "jump\[^\\n\]*bar" } } */
-
-extern void foo () __attribute__((longcall));
-extern void bar () __attribute__((shortcall));
-extern void baz ();
-
-int t1 ()
-{
- foo ();
- bar ();
- baz ();
- return 4;
-}
-
-void t2 ()
-{
- foo ();
-}
-void t3 ()
-{
- bar ();
-}
-void t4 ()
-{
- baz ();
-}
diff --git a/gcc/testsuite/gcc.dg/bfin-longcall-2.c b/gcc/testsuite/gcc.dg/bfin-longcall-2.c
deleted file mode 100644
index 33189b01fd6..00000000000
--- a/gcc/testsuite/gcc.dg/bfin-longcall-2.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* { dg-do compile { target bfin-*-* } } */
-/* { dg-options "-O2 -mlong-calls" } */
-/* { dg-final { scan-assembler-not "call\[^\\n\]*foo" } } */
-/* { dg-final { scan-assembler-not "jump\[^\\n\]*foo" } } */
-/* { dg-final { scan-assembler-not "call\[^\\n\]*baz" } } */
-/* { dg-final { scan-assembler-not "jump\[^\\n\]*baz" } } */
-/* { dg-final { scan-assembler "call\[^\\n\]*bar" } } */
-/* { dg-final { scan-assembler "jump\[^\\n\]*bar" } } */
-
-extern void foo () __attribute__((longcall));
-extern void bar () __attribute__((shortcall));
-extern void baz ();
-
-int t1 ()
-{
- foo ();
- bar ();
- baz ();
- return 4;
-}
-
-void t2 ()
-{
- foo ();
-}
-void t3 ()
-{
- bar ();
-}
-void t4 ()
-{
- baz ();
-}
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-2.c b/gcc/testsuite/gcc.dg/c99-tgmath-2.c
index d162d4ac9ad..22435f3f9a4 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-2.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-2.c
@@ -11,4 +11,4 @@ float foo(float x)
return sin(x);
}
-/* {dg-final {scan-assembler "sinf" } } */
+/* { dg-final { scan-assembler "sinf" } } */
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-3.c b/gcc/testsuite/gcc.dg/c99-tgmath-3.c
index 4d0de1ee56b..d3eaca15aee 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-3.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-3.c
@@ -11,4 +11,4 @@ complex double foo(complex double x)
return exp(x);
}
-/* {dg-final {scan-assembler "cexp" } } */
+/* { dg-final { scan-assembler "cexp" } } */
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-4.c b/gcc/testsuite/gcc.dg/c99-tgmath-4.c
index e9e490bdec7..7d40449a773 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-4.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-4.c
@@ -11,4 +11,4 @@ complex double foo(complex float x, float y)
return pow(x, y);
}
-/* {dg-final {scan-assembler "cpowf" } } */
+/* { dg-final { scan-assembler "cpowf" } } */
diff --git a/gcc/testsuite/gcc.dg/cast-lvalue-2.c b/gcc/testsuite/gcc.dg/cast-lvalue-2.c
index ed6a2e69fe8..d4db4bd6ff3 100644
--- a/gcc/testsuite/gcc.dg/cast-lvalue-2.c
+++ b/gcc/testsuite/gcc.dg/cast-lvalue-2.c
@@ -10,4 +10,4 @@ foo (void)
{
(int) x = 1; /* { dg-bogus "warning" "warning in place of error" } */
}
-/* { dg-error "lvalue" "cast as lvalue" { target *-*-*} 11 } */
+/* { dg-error "lvalue" "cast as lvalue" { target *-*-* } 11 } */
diff --git a/gcc/testsuite/gcc.dg/cleanup-11.c b/gcc/testsuite/gcc.dg/cleanup-11.c
index 6e145c5f31c..d0c78d577b7 100644
--- a/gcc/testsuite/gcc.dg/cleanup-11.c
+++ b/gcc/testsuite/gcc.dg/cleanup-11.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]*} } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime signal
frames on alternate stack. */
diff --git a/gcc/testsuite/gcc.dg/cleanup-12.c b/gcc/testsuite/gcc.dg/cleanup-12.c
new file mode 100644
index 00000000000..90de90ac831
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cleanup-12.c
@@ -0,0 +1,69 @@
+/* PR middle-end/32758 */
+/* HP-UX libunwind.so doesn't provide _UA_END_OF_STACK */
+/* { dg-do run } */
+/* { dg-options "-O2 -fexceptions" } */
+/* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */
+/* Verify unwind info in presence of alloca. */
+
+#include <unwind.h>
+#include <stdlib.h>
+#include <string.h>
+
+static _Unwind_Reason_Code
+force_unwind_stop (int version, _Unwind_Action actions,
+ _Unwind_Exception_Class exc_class,
+ struct _Unwind_Exception *exc_obj,
+ struct _Unwind_Context *context,
+ void *stop_parameter)
+{
+ if (actions & _UA_END_OF_STACK)
+ abort ();
+ return _URC_NO_REASON;
+}
+
+static void force_unwind (void)
+{
+ struct _Unwind_Exception *exc = malloc (sizeof (*exc));
+ memset (&exc->exception_class, 0, sizeof (exc->exception_class));
+ exc->exception_cleanup = 0;
+
+#ifndef __USING_SJLJ_EXCEPTIONS__
+ _Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
+#else
+ _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0);
+#endif
+
+ abort ();
+}
+
+__attribute__((noinline))
+void foo (void *x __attribute__((unused)))
+{
+ force_unwind ();
+}
+
+__attribute__((noinline))
+int bar (unsigned int x)
+{
+ void *y = __builtin_alloca (x);
+ foo (y);
+ return 1;
+}
+
+static void handler (void *p __attribute__((unused)))
+{
+ exit (0);
+}
+
+__attribute__((noinline))
+static void doit ()
+{
+ char dummy __attribute__((cleanup (handler)));
+ bar (1024);
+}
+
+int main ()
+{
+ doit ();
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/cleanup-8.c b/gcc/testsuite/gcc.dg/cleanup-8.c
index 6f3ff6c511b..d2335606a21 100644
--- a/gcc/testsuite/gcc.dg/cleanup-8.c
+++ b/gcc/testsuite/gcc.dg/cleanup-8.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]*} } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through signal
frames. */
diff --git a/gcc/testsuite/gcc.dg/cleanup-9.c b/gcc/testsuite/gcc.dg/cleanup-9.c
index 93d0463aab8..b73125ace96 100644
--- a/gcc/testsuite/gcc.dg/cleanup-9.c
+++ b/gcc/testsuite/gcc.dg/cleanup-9.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]*} } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime
signal frames. */
diff --git a/gcc/testsuite/gcc.dg/const-compare.c b/gcc/testsuite/gcc.dg/const-compare.c
deleted file mode 100644
index c9e50cfbbbb..00000000000
--- a/gcc/testsuite/gcc.dg/const-compare.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* { dg-do compile { target powerpc*-*-darwin* } } */
-/* { dg-options "-m64 -O1 -static" } */
-typedef unsigned long long uint64_t;
-
-static int
-match(name, pat)
- uint64_t *name, *pat;
-{
- int ok=0, negate_range;
- uint64_t c, k;
-
- c = *pat++;
- switch (c & 0xffffffffffULL) {
- case ((uint64_t)(('[')|0x8000000000ULL)):
- if ((negate_range = ((*pat & 0xffffffffffULL) == ((uint64_t)(('!')|0x8000000000ULL)) )) != '\0')
- ++pat;
- while (((c = *pat++) & 0xffffffffffULL) )
- if ((*pat & 0xffffffffffULL) == ((uint64_t)(('-')|0x8000000000ULL)))
- {
- pat += 2;
- }
-
- if (ok == negate_range)
- return(0);
- break;
- }
- return(*name == '\0');
-}
-
diff --git a/gcc/testsuite/gcc.dg/const-float128-ped.c b/gcc/testsuite/gcc.dg/const-float128-ped.c
index 52f0525dcd3..86a630cf951 100644
--- a/gcc/testsuite/gcc.dg/const-float128-ped.c
+++ b/gcc/testsuite/gcc.dg/const-float128-ped.c
@@ -1,5 +1,5 @@
/* Test 'q' suffix with -pedantic on __float128 type constants. */
-/* { dg-do compile { target { ia64-*-* || { { i?86-*-* x86_64-*-*} && lp64 } } } } */
+/* { dg-do compile { target { ia64-*-* || { { i?86-*-* x86_64-*-* } && lp64 } } } } */
/* { dg-options "-pedantic" } */
__float128 a = 123.456789q; /* { dg-warning "non-standard suffix on floating constant" } */
diff --git a/gcc/testsuite/gcc.dg/const-float128.c b/gcc/testsuite/gcc.dg/const-float128.c
index 1797e08bc30..146e0c9c986 100644
--- a/gcc/testsuite/gcc.dg/const-float128.c
+++ b/gcc/testsuite/gcc.dg/const-float128.c
@@ -1,5 +1,5 @@
/* Test 'q' and 'Q' suffixes on __float128 type constants. */
-/* { dg-do compile { target { ia64-*-* || { { i?86-*-* x86_64-*-*} && lp64 } } } } */
+/* { dg-do compile { target { ia64-*-* || { { i?86-*-* x86_64-*-* } && lp64 } } } } */
/* { dg-options "" } */
__float128 a = 123.456789q;
diff --git a/gcc/testsuite/gcc.dg/cpp/empty-include.c b/gcc/testsuite/gcc.dg/cpp/empty-include.c
index 6b5a47cbba7..f0f5b40bc1b 100644
--- a/gcc/testsuite/gcc.dg/cpp/empty-include.c
+++ b/gcc/testsuite/gcc.dg/cpp/empty-include.c
@@ -8,6 +8,6 @@
* We should get an error.
*/
-/* {dg-do preprocess} */
+/* { dg-do preprocess } */
#include "" /* { dg-error "empty" "error on empty filename in include" } */
int x; /* Otherwise we have an empty file and get more errors. */
diff --git a/gcc/testsuite/gcc.dg/cris-peep2-andu1.c b/gcc/testsuite/gcc.dg/cris-peep2-andu1.c
deleted file mode 100644
index 2e546e6256d..00000000000
--- a/gcc/testsuite/gcc.dg/cris-peep2-andu1.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* { dg-do compile { target cris-*-* } } */
-/* { dg-final { scan-assembler-not "and.d " } } */
-/* { dg-final { scan-assembler-not "move.d " } } */
-/* { dg-final { scan-assembler "cLear.b" } } */
-/* { dg-final { scan-assembler "movu.b" } } */
-/* { dg-final { scan-assembler "and.b" } } */
-/* { dg-final { scan-assembler "movu.w" } } */
-/* { dg-final { scan-assembler "and.w" } } */
-/* { dg-final { scan-assembler "andq" } } */
-/* { dg-options "-O2" } */
-
-/* Test the "andu" peephole2 trivially, memory operand. */
-
-int
-clearb (int x, int *y)
-{
- return *y & 0xff00;
-}
-
-int
-andb (int x, int *y)
-{
- return *y & 0x3f;
-}
-
-int
-andw (int x, int *y)
-{
- return *y & 0xfff;
-}
-
-int
-andq (int x, int *y)
-{
- return *y & 0xf0;
-}
-
-int
-andq2 (int x, int *y)
-{
- return *y & 0xfff0;
-}
diff --git a/gcc/testsuite/gcc.dg/cris-peep2-andu2.c b/gcc/testsuite/gcc.dg/cris-peep2-andu2.c
deleted file mode 100644
index 4f687cc081c..00000000000
--- a/gcc/testsuite/gcc.dg/cris-peep2-andu2.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* { dg-do compile { target cris-*-* } } */
-/* { dg-final { scan-assembler "movu.w \\\$r10,\\\$r" } } */
-/* { dg-final { scan-assembler "and.w 2047,\\\$r" } } */
-/* { dg-final { scan-assembler-not "move.d \\\$r10,\\\$r" } } */
-/* { dg-final { scan-assembler "movu.b \\\$r10,\\\$r" } } */
-/* { dg-final { scan-assembler "and.b 95,\\\$r" } } */
-/* { dg-final { scan-assembler "andq -2,\\\$r" } } */
-/* { dg-options "-O2" } */
-
-/* Test the "andu" peephole2 trivially, register operand. */
-
-unsigned int
-and_peep2_hi (unsigned int y, unsigned int *x)
-{
- *x = y & 0x7ff;
- return y;
-}
-
-unsigned int
-and_peep2_qi (unsigned int y, unsigned int *x)
-{
- *x = y & 0x5f;
- return y;
-}
-
-
-unsigned int
-and_peep2_q (unsigned int y, unsigned int *x)
-{
- *x = y & 0xfe;
- return y;
-}
diff --git a/gcc/testsuite/gcc.dg/cris-peep2-xsrand.c b/gcc/testsuite/gcc.dg/cris-peep2-xsrand.c
deleted file mode 100644
index 9cfe40fb6e1..00000000000
--- a/gcc/testsuite/gcc.dg/cris-peep2-xsrand.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* { dg-do compile { target cris-*-* } } */
-/* { dg-final { scan-assembler "and.w " } } */
-/* { dg-final { scan-assembler "and.b " } } */
-/* { dg-final { scan-assembler-not "and.d" } } */
-/* { dg-options "-O2" } */
-
-/* Test the "asrandb", "asrandw", "lsrandb" and "lsrandw" peephole2:s
- trivially. */
-
-unsigned int
-andwlsr (unsigned int x)
-{
- return (x >> 17) & 0x7ff;
-}
-
-unsigned int
-andblsr (unsigned int x)
-{
- return (x >> 25) & 0x5f;
-}
-
-int
-andwasr (int x)
-{
- return (x >> 17) & 0x7ff;
-}
-
-int
-andbasr (int x)
-{
- return (x >> 25) & 0x5f;
-}
diff --git a/gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c b/gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c
deleted file mode 100644
index 30679b271cb..00000000000
--- a/gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* { dg-do compile { target cris-*-* } } */
-/* { dg-final { scan-assembler "and.w -137," } } */
-/* { dg-final { scan-assembler "and.b -64," } } */
-/* { dg-final { scan-assembler "and.w -139," } } */
-/* { dg-final { scan-assembler "and.b -63," } } */
-/* { dg-final { scan-assembler-not "and.d" } } */
-/* { dg-options "-O2" } */
-
-/* PR target/17984. Test-case based on
- testsuite/gcc.dg/cris-peep2-xsrand.c. */
-
-unsigned int
-andwlsr (unsigned int x)
-{
- return (x >> 16) & 0xff77;
-}
-
-unsigned int
-andblsr (unsigned int x)
-{
- return (x >> 24) & 0xc0;
-}
-
-int
-andwasr (int x)
-{
- return (x >> 16) & 0xff75;
-}
-
-int
-andbasr (int x)
-{
- return (x >> 24) & 0xc1;
-}
diff --git a/gcc/testsuite/gcc.dg/pr31344.c b/gcc/testsuite/gcc.dg/dfp/pr31344.c
index a01439b7e0e..de76a72f937 100644
--- a/gcc/testsuite/gcc.dg/pr31344.c
+++ b/gcc/testsuite/gcc.dg/dfp/pr31344.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target dfp } } */
+/* { dg-do compile } */
/* { dg-options "-O -std=gnu99 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
/* { dg-options "-O -std=gnu99" } */
diff --git a/gcc/testsuite/gcc.dg/dfp/pr31385.c b/gcc/testsuite/gcc.dg/dfp/pr31385.c
new file mode 100644
index 00000000000..63a23c4bb75
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/dfp/pr31385.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -O2" } */
+
+typedef _Decimal32 fp_t;
+
+extern fp_t g(fp_t);
+
+fp_t
+bug(fp_t x)
+{
+ fp_t result;
+ int n;
+ fp_t f, f3, y, z;
+
+ n = 0;
+ y = 1.DF;
+ f = g(x);
+
+ if (f < 0.DF)
+ f = -f;
+
+ f3 = 2.DF;
+
+ z = (y + y + f / (y * y));
+ y = (z + z) / (9.DF) + f3 / (z * z);
+
+ result = y;
+
+ return (result);
+}
diff --git a/gcc/testsuite/gcc.dg/fold-eqandshift-1.c b/gcc/testsuite/gcc.dg/fold-eqandshift-1.c
index 34906bad020..055f398af0b 100644
--- a/gcc/testsuite/gcc.dg/fold-eqandshift-1.c
+++ b/gcc/testsuite/gcc.dg/fold-eqandshift-1.c
@@ -25,15 +25,25 @@ int test4(int d)
return (d >> 3) & 4;
}
+#if __INT_MAX__ == 32767
+#define INT_BITS 16
+#elif __INT_MAX__ == 2147483647
+#define INT_BITS 32
+#elif __INT_MAX__ == 9223372036854775807
+#define INT_BITS 64
+#else
+#error Please add support for your target here.
+#endif
+
void test5(int e)
{
- if ((e >> 31) & 64)
+ if ((e >> (INT_BITS - 1)) & 64)
foo();
}
void test6(unsigned int f)
{
- if ((f >> 31) & 64)
+ if ((f >> (INT_BITS - 1)) & 64)
foo();
}
diff --git a/gcc/testsuite/gcc.dg/h8300-ice2.c b/gcc/testsuite/gcc.dg/h8300-ice2.c
index 5dd746a42e9..216ea34c94c 100644
--- a/gcc/testsuite/gcc.dg/h8300-ice2.c
+++ b/gcc/testsuite/gcc.dg/h8300-ice2.c
@@ -1,4 +1,4 @@
-/*{dg-do compile target {h8300-*-*}} */
+/* { dg-do compile } */
/* ICE for signed/unsigned long and signed char comparison */
int main()
{
diff --git a/gcc/testsuite/gcc.dg/i386-darwin-fpmath.c b/gcc/testsuite/gcc.dg/i386-darwin-fpmath.c
deleted file mode 100644
index 7db69467089..00000000000
--- a/gcc/testsuite/gcc.dg/i386-darwin-fpmath.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile { target i?86-*-darwin* } } */
-/* { dg-final { scan-assembler "addsd" } } */
-/* Do not add -msse or -msse2 or -mfpmath=sse to the options. GCC is
- supposed to use SSE math on Darwin by default, and libm won't work
- right if it doesn't. */
-double foo(double x, double y)
-{
- return x + y;
-}
diff --git a/gcc/testsuite/gcc.dg/ifelse-2.c b/gcc/testsuite/gcc.dg/ifelse-2.c
new file mode 100644
index 00000000000..0210fcfa4b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ifelse-2.c
@@ -0,0 +1,34 @@
+/*
+{ dg-do run }
+{ dg-options "-O2" }
+*/
+
+extern void abort (void);
+
+enum Status
+{
+ P_ON_LOWER = -4,
+ P_ON_UPPER = -2,
+ P_FREE = -1
+};
+
+void
+foo (enum Status *stat, double newUpper, double lower, double max)
+{
+ if (newUpper >= max)
+ *stat = P_FREE;
+ else if (newUpper == lower)
+ *stat = P_ON_LOWER;
+}
+
+int
+main ()
+{
+ enum Status stat = P_ON_UPPER;
+
+ foo (&stat, 5.0, -10.0, 10.0);
+
+ if (stat != P_ON_UPPER)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/inline-24.c b/gcc/testsuite/gcc.dg/inline-24.c
new file mode 100644
index 00000000000..d9758176c61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/inline-24.c
@@ -0,0 +1,28 @@
+/* Verify that gnu_inline inlines disregard inlining limits. */
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+extern int foo (int);
+extern int baz (int);
+
+extern inline __attribute__((gnu_inline))
+int foo (int x)
+{
+ int i;
+ if (!__builtin_constant_p (x))
+ {
+#define B(n) baz (1##n) + baz (2##n) + baz (3##n) \
+ + baz (4##n) + baz (5##n) + baz (6##n)
+#define C(n) B(1##n) + B(2##n) + B(3##n) + B(4##n) + B(5##n) + B(6##n)
+#define D(n) C(1##n) + C(2##n) + C(3##n) + C(4##n) + C(5##n) + C(6##n)
+ return D(0) + D(1) + D(2) + D(3) + D(4)
+ + D(5) + D(6) + D(7) + D(8) + D(9);
+ }
+ return 0;
+}
+
+int
+main (void)
+{
+ return foo (0);
+}
diff --git a/gcc/testsuite/gcc.dg/m68k-pic-1.c b/gcc/testsuite/gcc.dg/m68k-pic-1.c
deleted file mode 100644
index b8d3fe81aea..00000000000
--- a/gcc/testsuite/gcc.dg/m68k-pic-1.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do compile { target m68k-*-* fido-*-* } } */
-/* { dg-options "-O2 -fpic" } */
-
-extern void Foo (void *);
-
-char *ary[] = {"a", "b", "c", "d", "e"};
-
-void Bar (void)
-{
- int cnt = 0;
-
- for (cnt = 0; cnt < 4; ++cnt)
- {
- char *ptr = ary[cnt];
-
- Foo (&ptr);
- }
-}
diff --git a/gcc/testsuite/gcc.dg/m68k-slp-ice.c b/gcc/testsuite/gcc.dg/m68k-slp-ice.c
deleted file mode 100644
index 61c7f9df3c0..00000000000
--- a/gcc/testsuite/gcc.dg/m68k-slp-ice.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* From PR 7872, test for optabs segfault when strict low part is present. */
-/* { dg-do compile { target m68k-*-* } } */
-/* { dg-options "-O0" } */
-extern void (**table)(void);
-
-typedef unsigned short uw16;
-typedef unsigned int gshort;
-
-register uw16 *pc asm("%a4");
-register gshort code asm("%d6");
-
-void QMExecuteLoop(uw16 *oldPC)
-{
- table[code=(*(uw16*)(pc++))]();
-}
diff --git a/gcc/testsuite/gcc.dg/nest.c b/gcc/testsuite/gcc.dg/nest.c
index 7178bd82045..5734c11f1a3 100644
--- a/gcc/testsuite/gcc.dg/nest.c
+++ b/gcc/testsuite/gcc.dg/nest.c
@@ -24,3 +24,5 @@ int main (void)
abort ();
return 0;
}
+
+/* { dg-final { cleanup-profile-file } } */
diff --git a/gcc/testsuite/gcc.dg/nested-func-4.c b/gcc/testsuite/gcc.dg/nested-func-4.c
index 30826d885a6..36a8c405ce2 100644
--- a/gcc/testsuite/gcc.dg/nested-func-4.c
+++ b/gcc/testsuite/gcc.dg/nested-func-4.c
@@ -21,3 +21,5 @@ int main(void)
foo (2);
return 0;
}
+
+/* { dg-final { cleanup-profile-file } } */
diff --git a/gcc/testsuite/gcc.dg/non-lazy-ptr-test.c b/gcc/testsuite/gcc.dg/non-lazy-ptr-test.c
deleted file mode 100644
index 10cce470ab3..00000000000
--- a/gcc/testsuite/gcc.dg/non-lazy-ptr-test.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* { dg-do compile { target powerpc*-apple-darwin* } } */
-/* { dg-options "-S" } */
-
-typedef void PF (void);
-
-static void f(void) {
-}
-
-void f1(void) {
-}
-
-extern void f2(void) {
-}
-
-static void f3(void);
-
-void pe(void)
-{
-}
-
-PF* g (void) { f(); return f; }
-PF* x (void) { return f1; }
-PF* y (void) { f2(); return f2; }
-PF* z (void) { return f3; }
-PF* w (void) { pe(); return pe; }
-
-int main()
-{
- (*g())();
- (*x())();
- (*y())();
- (*z())();
- (*w())();
- return 0;
-}
-
-void f3(void) {
-}
-
-/* { dg-final { scan-assembler-not "non_lazy_ptr" } } */
diff --git a/gcc/testsuite/gcc.dg/pr20927.c b/gcc/testsuite/gcc.dg/pr20927.c
deleted file mode 100644
index 55cda33e8c4..00000000000
--- a/gcc/testsuite/gcc.dg/pr20927.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This caused an ICE on s390x due to a reload inheritance bug. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2" } */
-
-struct point { double x, y; };
-extern void use (struct point);
-
-void test (struct point *pc, struct point p1)
-{
- struct point p0 = *pc;
-
- if (p0.x == p1.x && p0.y == p1.y)
- use (p0);
-
- asm ("" : : : "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10");
-
- p1.y -= p0.y;
-
- use (p0);
- use (p1);
-}
-
diff --git a/gcc/testsuite/gcc.dg/pr21255-1.c b/gcc/testsuite/gcc.dg/pr21255-1.c
deleted file mode 100644
index 5d5b6d7f9a6..00000000000
--- a/gcc/testsuite/gcc.dg/pr21255-1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O2 -fomit-frame-pointer" } */
-/* { dg-final { scan-assembler "mov fr4,fr.; mov fr5,fr." { target sh-*-* } } } */
-/* { dg-final { scan-assembler "mov fr4,fr.; mov fr5,fr." { target sh[1234lb]*-*-* } } } */
-/* { dg-final { scan-assembler "mov fr0,fr.; mov fr1,fr." { target sh[56]*-*-* } } } */
-double
-f (double d)
-{
- double r;
-
-#if defined (__SH_FPU_DOUBLE__)
- asm ("mov %S1,%S0; mov %R1,%R0" : "=f" (r) : "f" (d));
-#else
- asm ("mov fr4,fr4; mov fr5,fr5");
-#endif
- return r;
-}
diff --git a/gcc/testsuite/gcc.dg/pr21255-2-mb.c b/gcc/testsuite/gcc.dg/pr21255-2-mb.c
deleted file mode 100644
index ac2ce687e1e..00000000000
--- a/gcc/testsuite/gcc.dg/pr21255-2-mb.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-mb -O2 -fomit-frame-pointer" } */
-/* { dg-final { scan-assembler "mov @r.,r.; mov @\\(4,r.\\),r." } } */
-double d;
-
-double
-f (void)
-{
- double r;
-
-/* If -ml from the target options is passed after -mb from dg-options, we
- end up with th reverse endianness. */
-#if TARGET_SHMEDIA || defined (__LITTLE_ENDIAN__)
- asm ("mov @r1,r3; mov @(4,r1),r4");
-#else
- asm ("mov %S1,%S0; mov %R1,%R0" : "=&r" (r) : "m" (d));
-#endif
- return r;
-}
diff --git a/gcc/testsuite/gcc.dg/pr21255-2-ml.c b/gcc/testsuite/gcc.dg/pr21255-2-ml.c
deleted file mode 100644
index c63a573ea9d..00000000000
--- a/gcc/testsuite/gcc.dg/pr21255-2-ml.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-ml -O2 -fomit-frame-pointer" } */
-/* { dg-final { scan-assembler "mov @\\(4,r.\\),r.; mov @r.,r." } } */
-double d;
-
-double
-f (void)
-{
- double r;
-
-/* If -mb from the target options is passed after -ml from dg-options, we
- end up with th reverse endianness. */
-#if TARGET_SHMEDIA || defined (__BIG_ENDIAN__)
- asm ("mov @(4,r1),r4; mov @r1,r3");
-#else
- asm ("mov %S1,%S0; mov %R1,%R0" : "=&r" (r) : "m" (d));
-#endif
- return r;
-}
diff --git a/gcc/testsuite/gcc.dg/pr21255-3.c b/gcc/testsuite/gcc.dg/pr21255-3.c
deleted file mode 100644
index 7edd8cb7c1c..00000000000
--- a/gcc/testsuite/gcc.dg/pr21255-3.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O2 -fomit-frame-pointer" } */
-/* { dg-final { scan-assembler "mov #?0,r.*; mov #?20,r" } } */
-/* { dg-final { scan-assembler "mov #?1077149696,r.*; mov #?0,r" } } */
-double
-f ()
-{
- double r;
-
- asm ("mov %S1,%S0; mov %R1,%R0" : "=r" (r) : "i" (20));
- asm ("mov %S1,%S0; mov %R1,%R0" : "+r" (r) : "i" (20.));
- return r;
-}
diff --git a/gcc/testsuite/gcc.dg/pr21255-4.c b/gcc/testsuite/gcc.dg/pr21255-4.c
deleted file mode 100644
index c848c26c0e7..00000000000
--- a/gcc/testsuite/gcc.dg/pr21255-4.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* { dg-do compile { target { sh*-*-* && nonpic } } } */
-/* { dg-options "-O2 -fomit-frame-pointer" } */
-
-double
-f ()
-{
- double r;
-
- asm ("mov %S1,%S0; mov %R1,%R0" : "=r" (r) : "i" (f));
-/* { dg-error "invalid operand to %S" "" {target "sh*-*-*" } 9 } */
-/* { dg-error "invalid operand to %R" "" {target "sh*-*-*" } 9 } */
- return r;
-}
diff --git a/gcc/testsuite/gcc.dg/pr24624.c b/gcc/testsuite/gcc.dg/pr24624.c
deleted file mode 100644
index fbfab0a6742..00000000000
--- a/gcc/testsuite/gcc.dg/pr24624.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* This used to ICE due to a backend problem on s390. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O1 -mpacked-stack" } */
-
-typedef unsigned int __u32;
-typedef struct
-{
- volatile int counter;
-} __attribute__ ((aligned (4))) atomic_t;
-static __inline__ __attribute__ ((always_inline))
- void atomic_inc (volatile atomic_t * v)
-{
- (
- {
- typeof (v->counter) old_val, new_val;
- __asm__ __volatile__ (
- " l %0,0(%3)\n"
- "0: lr %1,%0\n"
- " ar %1,%4\n"
- " cs %0,%1,0(%3)\n"
- " jl 0b":
- "=&d" (old_val), "=&d" (new_val), "=m" (((atomic_t *) (v))->counter):
- "a" (v), "d" (1), "m" (((atomic_t *) (v))->counter):
- "cc", "memory");
- });
-}
-extern unsigned long volatile __attribute__ ((section (".data"))) jiffies;
-struct inet_peer
-{
- unsigned long dtime;
- atomic_t refcnt;
-};
-static volatile int peer_total;
-int inet_peer_threshold = 65536 + 128;
-int inet_peer_minttl = 120 * 100;
-int inet_peer_maxttl = 10 * 60 * 100;
-static int
-cleanup_once (unsigned long ttl)
-{
- struct inet_peer *p;
- if (p != ((void *) 0))
- {
- if (((
- {
- 1;}
- ) && ((long) (jiffies) - (long) (p->dtime + ttl) < 0)))
- {
- return -1;
- }
- atomic_inc (&p->refcnt);
- }
-}
-struct inet_peer *
-inet_getpeer (__u32 daddr, int create)
-{
- int i;
- int ttl;
- if (peer_total >= inet_peer_threshold)
- ttl = inet_peer_minttl;
- else
- ttl =
- inet_peer_maxttl - (inet_peer_maxttl -
- inet_peer_minttl) / 100 * peer_total /
- inet_peer_threshold * 100;
- for (i = 0; i < 30 && !cleanup_once (ttl); i++);
-}
diff --git a/gcc/testsuite/gcc.dg/pr27661.c b/gcc/testsuite/gcc.dg/pr27661.c
deleted file mode 100644
index 7660c822fb9..00000000000
--- a/gcc/testsuite/gcc.dg/pr27661.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This used to ICE on s390 due to a reload bug. */
-
-/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2 -march=z990 -ftracer" } */
-
-extern int memcmp (const void *s1, const void *s2, unsigned long n);
-extern int printf (__const char *__restrict __format, ...);
-
-struct test
-{
- char tmp[4096];
- char msgtype[2];
-};
-
-void test (struct test *testtb)
-{
- if (testtb)
- printf ("a");
-
- if (memcmp(testtb->msgtype, "a", 2))
- printf ("a");
-
- printf ("b");
-}
-
diff --git a/gcc/testsuite/gcc.dg/pr30744-1.c b/gcc/testsuite/gcc.dg/pr30744-1.c
index f0734db60f2..a35c5526aa1 100644
--- a/gcc/testsuite/gcc.dg/pr30744-1.c
+++ b/gcc/testsuite/gcc.dg/pr30744-1.c
@@ -1,15 +1,16 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
+#include <stddef.h>
typedef struct {
- unsigned long unique;
+ ptrdiff_t unique;
} G;
void r(G* n)
{
- unsigned long p;
- if (((G *) ((void *)((~(unsigned long)(p))))) != ((void *)0)) {
- ((G *) ((void *)((~(unsigned long)(p)))))->unique = n->unique;
+ ptrdiff_t p;
+ if (((G *) ((void *)((~(ptrdiff_t)(p))))) != ((void *)0)) {
+ ((G *) ((void *)((~(ptrdiff_t)(p)))))->unique = n->unique;
}
}
diff --git a/gcc/testsuite/gcc.dg/pr32328.c b/gcc/testsuite/gcc.dg/pr32328.c
new file mode 100644
index 00000000000..69b08fc4fdf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr32328.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct barstruct { char const* some_string; };
+
+void changethepointer(struct barstruct**);
+
+void baz()
+{
+ struct barstruct bar1;
+ struct barstruct* barptr = &bar1;
+ changethepointer(&barptr);
+ barptr->some_string = "Everything OK";
+}
+
+/* { dg-final { scan-tree-dump "Everything OK" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr32370.c b/gcc/testsuite/gcc.dg/pr32370.c
new file mode 100644
index 00000000000..18afde21f0f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr32370.c
@@ -0,0 +1,24 @@
+/* PR middle-end/32370 */
+/* { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" { target ia64-*-* } } */
+/* { dg-options "-ffixed-esi" { target i?86-*-* x86_64-*-* } } */
+
+#if defined __i386__ || defined __x86_64__
+# define C "=S"
+#elif defined __ia64__
+# define C "=a"
+#endif
+
+unsigned int
+foo (unsigned long port)
+{
+ unsigned int v;
+ __asm__ __volatile__ ("" : C (v) : "Nd" (port)); /* { dg-error "while reloading\|has impossible" } */
+ return v;
+}
+
+void
+bar (void)
+{
+ foo (0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr32450.c b/gcc/testsuite/gcc.dg/pr32450.c
index 4a1842e9b84..9606e3021ea 100644
--- a/gcc/testsuite/gcc.dg/pr32450.c
+++ b/gcc/testsuite/gcc.dg/pr32450.c
@@ -32,3 +32,5 @@ int main ()
add ();
return stack_pointer - 1;
}
+
+/* { dg-final { cleanup-profile-file } } */
diff --git a/gcc/testsuite/gcc.dg/pr32573.c b/gcc/testsuite/gcc.dg/pr32573.c
new file mode 100644
index 00000000000..d6897fbc22f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr32573.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/32573 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int
+foo (void *x, long long *y)
+{
+ char a[256];
+ int i = 0;
+ long long b;
+ int c;
+ int d = 0;
+ int e = 0;
+ unsigned f = 0;
+ b = bar (x);
+ c = (unsigned) b;
+ while (d < b && d < 65557)
+ {
+ f = *(unsigned *) &a[0];
+ for (i = c - 4; i > 0; i--)
+ if (a[i + 0] == 0x50
+ && a[i + 1] == 0x4B
+ && a[i + 3] == 0x06)
+ {
+ e = 1;
+ break;
+ }
+ }
+ return !e;
+}
diff --git a/gcc/testsuite/gcc.dg/pr32721.c b/gcc/testsuite/gcc.dg/pr32721.c
index 392937ebbf6..bd67c79521e 100644
--- a/gcc/testsuite/gcc.dg/pr32721.c
+++ b/gcc/testsuite/gcc.dg/pr32721.c
@@ -14,5 +14,5 @@ spinlock1 = &spinlock[1];
while (*spinlock0);
}
-/* { dg-final { scan-tree-dump "= spinlock.0." "optimized" } } */
+/* { dg-final { scan-tree-dump "={v} spinlock.0." "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c b/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c
index 9b3233a36b5..00a0608ccb4 100644
--- a/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c
+++ b/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target sh-*-* sh[1234ble]*-*-* } } */
/* { dg-options "-O" } */
/* This test case will check whether trapa is generated only for isr. */
#pragma interrupt
diff --git a/gcc/testsuite/gcc.dg/pragma-isr.c b/gcc/testsuite/gcc.dg/pragma-isr.c
index 07d8fa7f1f9..e7565a68245 100644
--- a/gcc/testsuite/gcc.dg/pragma-isr.c
+++ b/gcc/testsuite/gcc.dg/pragma-isr.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target h8300-*-* sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target h8300-*-* sh-*-* sh[1234ble]*-*-* } } */
/* { dg-options "-O3" } */
/* Test case will check whether rte is generated for two ISRs*/
extern void foo();
diff --git a/gcc/testsuite/gcc.dg/pragma-isr2.c b/gcc/testsuite/gcc.dg/pragma-isr2.c
index 7dba7f9bf61..3e2e4bb38ba 100644
--- a/gcc/testsuite/gcc.dg/pragma-isr2.c
+++ b/gcc/testsuite/gcc.dg/pragma-isr2.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target h8300-*-* sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target h8300-*-* sh-*-* sh[1234ble]*-*-* } } */
/* { dg-options "-O" } */
/* This test case will check whether rte is generated only for isr. */
#pragma interrupt
diff --git a/gcc/testsuite/gcc.dg/rs6000-leaf.c b/gcc/testsuite/gcc.dg/rs6000-leaf.c
deleted file mode 100644
index 079418930da..00000000000
--- a/gcc/testsuite/gcc.dg/rs6000-leaf.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* { dg-do compile { target rs6000-*-* } } */
-/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-not "\tstwu 1,-\[0-9\]*(1)\n" } } */
-
-int Leaf (int i)
-{
- return i + 1;
-}
diff --git a/gcc/testsuite/gcc.dg/sh-relax-vxworks.c b/gcc/testsuite/gcc.dg/sh-relax-vxworks.c
deleted file mode 100644
index f8c2ffef431..00000000000
--- a/gcc/testsuite/gcc.dg/sh-relax-vxworks.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Check that -mrelax produces the correct error message. */
-/* { dg-do compile { target { sh-*-vxworks* && nonpic } } } */
-/* { dg-error "-mrelax is only supported for RTP PIC" "" { target *-*-* } 0 } */
-/* { dg-options "-O1 -mrelax" } */
-int x;
diff --git a/gcc/testsuite/gcc.dg/sh-relax.c b/gcc/testsuite/gcc.dg/sh-relax.c
deleted file mode 100644
index 54422de46d2..00000000000
--- a/gcc/testsuite/gcc.dg/sh-relax.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Check that -mrelax works. */
-/* { dg-do run { target { { sh-*-* sh?-*-* } && { ! { sh*-*-vxworks* && nonpic } } } } } */
-/* { dg-options "-O1 -mrelax" } */
-
-extern void abort (void);
-extern int qwerty (int);
-
-int
-f (int i)
-{
- return qwerty (i) + 1;
-}
-
-int
-qwerty (int i)
-{
- switch (i)
- {
- case 1:
- return 'q';
- case 2:
- return 'w';
- case 3:
- return 'e';
- case 4:
- return 'r';
- case 5:
- return 't';
- case 6:
- return 'y';
- }
-}
-
-int
-main ()
-{
- if (f (1) != 'q' + 1 || f (2) != 'w' + 1 || f (3) != 'e' + 1
- || f(4) != 'r' + 1 || f (5) != 't' + 1 || f (6) != 'y' + 1)
- abort ();
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/sh4a-bitmovua.c b/gcc/testsuite/gcc.dg/sh4a-bitmovua.c
deleted file mode 100644
index b7081bf7186..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-bitmovua.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Verify that we generate movua to load unaligned 32-bit values. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O" } */
-/* { dg-final { scan-assembler-times "\tmovua\\.l\t" 6 } } */
-
-#ifdef __SH4A__
-/* Aligned. */
-struct s0 { long long d : 32; } x0;
-long long f0() {
- return x0.d;
-}
-
-/* Unaligned load. */
-struct s1 { long long c : 8; long long d : 32; } x1;
-long long f1() {
- return x1.d;
-}
-
-/* Unaligned load. */
-struct s2 { long long c : 16; long long d : 32; } x2;
-long long f2() {
- return x2.d;
-}
-
-/* Unaligned load. */
-struct s3 { long long c : 24; long long d : 32; } x3;
-long long f3() {
- return x3.d;
-}
-
-/* Aligned. */
-struct s4 { long long c : 32; long long d : 32; } x4;
-long long f4() {
- return x4.d;
-}
-
-/* Aligned. */
-struct u0 { unsigned long long d : 32; } y0;
-unsigned long long g0() {
- return y0.d;
-}
-
-/* Unaligned load. */
-struct u1 { long long c : 8; unsigned long long d : 32; } y1;
-unsigned long long g1() {
- return y1.d;
-}
-
-/* Unaligned load. */
-struct u2 { long long c : 16; unsigned long long d : 32; } y2;
-unsigned long long g2() {
- return y2.d;
-}
-
-/* Unaligned load. */
-struct u3 { long long c : 24; unsigned long long d : 32; } y3;
-unsigned long long g3() {
- return y3.d;
-}
-
-/* Aligned. */
-struct u4 { long long c : 32; unsigned long long d : 32; } y4;
-unsigned long long g4() {
- return y4.d;
-}
-#else
-asm ("movua.l\t");
-asm ("movua.l\t");
-asm ("movua.l\t");
-asm ("movua.l\t");
-asm ("movua.l\t");
-asm ("movua.l\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-cos.c b/gcc/testsuite/gcc.dg/sh4a-cos.c
deleted file mode 100644
index 198d41f8675..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-cos.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Verify that we generate single-precision sine and cosine approximate
- (fsca) in fast math mode. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler "\tfsca\t" } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-double test(double f) { return cos(f); }
-#else
-asm ("fsca\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-cosf.c b/gcc/testsuite/gcc.dg/sh4a-cosf.c
deleted file mode 100644
index f78c140d501..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-cosf.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Verify that we generate single-precision sine and cosine approximate
- (fsca) in fast math mode. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler "\tfsca\t" } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-float test(float f) { return cosf(f); }
-#else
-asm ("fsca\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-fprun.c b/gcc/testsuite/gcc.dg/sh4a-fprun.c
deleted file mode 100644
index 40c2b05aabb..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-fprun.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Verify that fsca and fssra yield reasonable results. */
-/* This test calls the sinf and cosf library functions for targets other
- than sh4a, but the VxWorks kernel doesn't have those functions. */
-/* { dg-do run { target { "sh*-*-*" && { ! vxworks_kernel } } } } */
-/* { dg-options "-O -ffast-math" } */
-
-#include <math.h>
-#include <stdlib.h>
-
-float sqrt_arg = 4.0f, sqrt_res = 2.0f;
-float dg2rad_f;
-double dg2rad_d;
-
-void check_f (float res, float expected) {
- if (res >= expected - 0.001f && res <= expected + 0.001f)
- return;
-
- abort ();
-}
-
-void check_d (double res, double expected) {
- if (res >= expected - 0.001 && res <= expected + 0.001)
- return;
-
- abort ();
-}
-
-int main() {
- check_f (sqrtf(sqrt_arg), sqrt_res);
- dg2rad_f = dg2rad_d = atan(1) / 45;
- check_f (sinf(90*dg2rad_f), 1);
- check_f (cosf(90*dg2rad_f), 0);
- check_d (sin(-90*dg2rad_d), -1);
- check_d (cos(180*dg2rad_d), -1);
- check_d (sin(-45*dg2rad_d) * cosf(135*dg2rad_f), 0.5);
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/sh4a-fsrra.c b/gcc/testsuite/gcc.dg/sh4a-fsrra.c
deleted file mode 100644
index c8f04e4d2e2..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-fsrra.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Verify that we generate single-precision square root reciprocal
- approximate (fsrra) in fast math mode. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler "\tfsrra\t" } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-float test(float f) { return 1 / sqrtf(f); }
-#else
-asm ("fsrra\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-memmovua.c b/gcc/testsuite/gcc.dg/sh4a-memmovua.c
deleted file mode 100644
index 68927929854..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-memmovua.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Verify that we generate movua to copy unaligned memory regions to
- 32-bit-aligned addresses. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O" } */
-/* { dg-final { scan-assembler-times "\tmovua\\.l\t(.*)+" 2 } } */
-
-#ifdef __SH4A__
-#include <stdlib.h>
-
-struct s { int i; char a[10], b[10]; } x;
-int f() {
- memcpy(x.a, x.b, 10);
-}
-#else
-asm ("movua.l\t+");
-asm ("movua.l\t+");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-sin.c b/gcc/testsuite/gcc.dg/sh4a-sin.c
deleted file mode 100644
index 9f46f600763..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-sin.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Verify that we generate single-precision sine and cosine approximate
- (fsca) in fast math mode. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler "\tfsca\t" } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-double test(double f) { return sin(f); }
-#else
-asm ("fsca\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-sincos.c b/gcc/testsuite/gcc.dg/sh4a-sincos.c
deleted file mode 100644
index f4293797534..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-sincos.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Verify that we generate a single single-precision sine and cosine
- approximate (fsca) in fast math mode when a function computes both
- sine and cosine. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler-times "\tfsca\t" 1 } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-double test(double f) { return sin(f) + cos(f); }
-#else
-asm ("fsca\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-sincosf.c b/gcc/testsuite/gcc.dg/sh4a-sincosf.c
deleted file mode 100644
index 42913dbd59e..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-sincosf.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Verify that we generate a single single-precision sine and cosine
- approximate (fsca) in fast math mode when a function computes both
- sine and cosine. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler-times "\tfsca\t" 1 } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-float test(float f) { return sinf(f) + cosf(f); }
-#else
-asm ("fsca\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sh4a-sinf.c b/gcc/testsuite/gcc.dg/sh4a-sinf.c
deleted file mode 100644
index 2a2343fd73a..00000000000
--- a/gcc/testsuite/gcc.dg/sh4a-sinf.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Verify that we generate single-precision sine and cosine approximate
- (fsca) in fast math mode. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-final { scan-assembler "\tfsca\t" } } */
-
-#if defined __SH4A__ && ! defined __SH4_NOFPU__
-#include <math.h>
-
-float test(float f) { return sinf(f); }
-#else
-asm ("fsca\t");
-#endif
diff --git a/gcc/testsuite/gcc.dg/sibcall-6.c b/gcc/testsuite/gcc.dg/sibcall-6.c
index ca26400ba33..f57f9c43781 100644
--- a/gcc/testsuite/gcc.dg/sibcall-6.c
+++ b/gcc/testsuite/gcc.dg/sibcall-6.c
@@ -6,8 +6,8 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Andreas Bauer <baueran@in.tum.de> */
-/* { dg-do run { target i?86-*-* s390*-*-* x86_64-*-*} } */
-/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* } } */
+/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } { "*" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/sms-1.c b/gcc/testsuite/gcc.dg/sms-1.c
new file mode 100644
index 00000000000..d915ef54f2b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sms-1.c
@@ -0,0 +1,38 @@
+/* The same test as loop-3c.c. It failed on ia64
+ due to not handling of subreg in the lhs that is fixed. */
+/* { dg-do run } */
+/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -w" } */
+
+
+#include <limits.h>
+
+void * a[255];
+
+f (m)
+{
+ int i;
+ int sh = 0x100;
+ i = m;
+ do
+ {
+ a[sh >>= 1] = ((unsigned)i << 3) + (char*)a;
+ i += 4;
+ }
+ while (i < INT_MAX/2 + 1 + 4 * 4);
+}
+
+main ()
+{
+ a[0x10] = 0;
+ a[0x08] = 0;
+ f (INT_MAX/2 + INT_MAX/4 + 2);
+ if (a[0x10] || a[0x08])
+ abort ();
+ a[0x10] = 0;
+ a[0x08] = 0;
+ f (INT_MAX/2 + 1);
+ if (! a[0x10] || a[0x08])
+ abort ();
+ exit (0);
+}
+
diff --git a/gcc/testsuite/gcc.dg/symbian1.c b/gcc/testsuite/gcc.dg/symbian1.c
deleted file mode 100644
index 25e81281683..00000000000
--- a/gcc/testsuite/gcc.dg/symbian1.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile { target arm*-*-symbianelf* } } */
-/* Symbian OS requires that all defined symbols with external linkage
- have the ELF STV_HIDDEN attribute set by default. */
-/* { dg-final { scan-assembler ".hidden.*i" } } */
-/* { dg-final { scan-assembler ".hidden.*j" } } */
-/* { dg-final { scan-assembler ".hidden.*f" } } */
-
-int i;
-int j = 3;
-void f() {}
-
diff --git a/gcc/testsuite/gcc.dg/symbian2.c b/gcc/testsuite/gcc.dg/symbian2.c
deleted file mode 100644
index 98701636875..00000000000
--- a/gcc/testsuite/gcc.dg/symbian2.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile { target arm*-*-symbianelf* } } */
-/* { dg-options "-O2" } */
-
-/* Symbian OS requires that builtins not be expanded by default. Make
- sure that a reference to "strlen" is emitted. */
-/* { dg-final { scan-assembler "strlen" } } */
-
-int f() {
- return strlen("abc");
-}
diff --git a/gcc/testsuite/gcc.dg/symbian3.c b/gcc/testsuite/gcc.dg/symbian3.c
deleted file mode 100644
index 2f11d355b4d..00000000000
--- a/gcc/testsuite/gcc.dg/symbian3.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/* { dg-do compile { target arm*-*-symbianelf* } } */
-/* Check that enumeration types are 4-byte types. */
-
-enum e { e_1 };
-
-extern int i[sizeof (enum e)];
-int i[4];
diff --git a/gcc/testsuite/gcc.dg/symbian4.c b/gcc/testsuite/gcc.dg/symbian4.c
deleted file mode 100644
index aede7f5c66c..00000000000
--- a/gcc/testsuite/gcc.dg/symbian4.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* { dg-do compile { target arm*-*-symbianelf* } } */
-/* Check that wchar_t is a 2-byte type. */
-
-extern int i[sizeof (L'a')];
-int i[2];
diff --git a/gcc/testsuite/gcc.dg/symbian5.c b/gcc/testsuite/gcc.dg/symbian5.c
deleted file mode 100644
index 0bde6b0cba3..00000000000
--- a/gcc/testsuite/gcc.dg/symbian5.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* { dg-do compile { target arm*-*-symbianelf* } } */
-/* { dg-options "-fno-short-wchar" } */
-/* Check that wchar_t is a 4-byte type when -fno-short-wchar is
- used. */
-
-extern int i[sizeof (L'a')];
-int i[4];
-
diff --git a/gcc/testsuite/gcc.dg/sync-2.c b/gcc/testsuite/gcc.dg/sync-2.c
index c82d66521ca..9849a705e27 100644
--- a/gcc/testsuite/gcc.dg/sync-2.c
+++ b/gcc/testsuite/gcc.dg/sync-2.c
@@ -8,7 +8,11 @@
extern void abort (void);
extern void *memcpy (void *, const void *, __SIZE_TYPE__);
-static char AI[18];
+#ifndef AI_ALIGN
+#define AI_ALIGN
+#endif
+
+static char AI[18] AI_ALIGN;
static char init_qi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 };
static char test_qi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 };
diff --git a/gcc/testsuite/gcc.dg/sync-3.c b/gcc/testsuite/gcc.dg/sync-3.c
new file mode 100644
index 00000000000..bf8abb785de
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sync-3.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+/* { dg-require-effective-target sync_char_short } */
+/* { dg-options "-O2" } */
+/* { dg-options "-march=i486 -O2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9 -O2" { target sparc*-*-* } } */
+
+/* Test functionality of the intrinsics for 'short' and 'char'. */
+
+#define AI_ALIGN __attribute__((__aligned__ (4)))
+#include "sync-2.c"
diff --git a/gcc/testsuite/gcc.dg/tls/opt-5.c b/gcc/testsuite/gcc.dg/tls/opt-5.c
index d8a686ddb46..ee71cad3c02 100644
--- a/gcc/testsuite/gcc.dg/tls/opt-5.c
+++ b/gcc/testsuite/gcc.dg/tls/opt-5.c
@@ -34,12 +34,12 @@ __gen_tempname (char *tmpl, int kind)
char *XXXXXX;
static uint64_t value;
uint64_t random_time_bits;
- unsigned int count;
+ unsigned long count;
int fd = -1;
int save_errno = __libc_errno;
struct stat64 st;
- unsigned int attempts_min = 62 * 62 * 62;
- unsigned int attempts = attempts_min < 238328 ? 238328 : attempts_min;
+ unsigned long attempts_min = 62L * 62L * 62L;
+ unsigned long attempts = attempts_min < 238328 ? 238328 : attempts_min;
len = strlen (tmpl);
if (len < 6 || strcmp(&tmpl[len - 6], "XXXXXX"))
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
index 5ad257b10c7..b08e1242bb8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
@@ -32,7 +32,7 @@ void test (void)
/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
index f55a78d00ea..93e38cb9a5f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
@@ -32,7 +32,7 @@ void test (void)
/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
index 07be245ff3f..a78d0880cf3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
@@ -32,11 +32,11 @@ void test (void)
/* { dg-final { scan-tree-dump "vi0.*printf.*\"hello\".*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*printf.*\"hello\".*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7 = 0\[^\(\)\]*vi8 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab"} } */
/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab"} } */
/* { dg-final { cleanup-tree-dump "fab" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
index f4d75b3c369..2f85b28ed7a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
@@ -32,11 +32,11 @@ void test (void)
/* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7 = 0\[^\(\)\]*vi8 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab"} } */
/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab"} } */
/* { dg-final { cleanup-tree-dump "fab" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
index 3a48e78da5a..1083f13bc32 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
@@ -32,7 +32,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*vfprintf.*\"%s\".*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*vfprintf.*\"%c\".*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*vfprintf.*\"%s\\\\n\".*vi7" "fab"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
index 9b9956174be..ce767d1a13a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
@@ -32,7 +32,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*__vfprintf_chk.*fp.*1.*\"%s\".*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*__vfprintf_chk.*fp.*1.*\"%c\".*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*__vfprintf_chk.*fp.*1.*\"%s\\\\n\".*vi7" "fab"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
index 5dea91618b9..416ee5b54ef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
@@ -30,7 +30,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
/* { dg-final { scan-tree-dump "vi0.*vprintf.*\"hello\".*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*vprintf.*\"%s\".*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*vprintf.*\"%c\".*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*vprintf.*\"%s\\\\n\".*vi7" "fab"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
index c3ccbfa08cf..567a3dfd114 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
@@ -30,7 +30,7 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
/* { dg-final { scan-tree-dump "vi0.*__vprintf_chk.*1.*\"hello\".*vi1" "fab"} } */
/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
/* { dg-final { scan-tree-dump "vi4.*__vprintf_chk.*1.*\"%s\".*vi5" "fab"} } */
/* { dg-final { scan-tree-dump "vi5.*__vprintf_chk.*1.*\"%c\".*vi6" "fab"} } */
/* { dg-final { scan-tree-dump "vi6.*__vprintf_chk.*1.*\"%s\\\\n\".*vi7" "fab"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-1.c b/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-1.c
index 2c040278436..a92498eb1f6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-1.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-original" } */
-
+#include <stddef.h>
char *a;
int foo(char *b)
{
- return a+5+(long)b == (long)b+a;
+ return a+5+(ptrdiff_t)b == (ptrdiff_t)b+a;
}
/* Folding should have determined that the two addresses were
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c b/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c
index 28a71a8e63f..725f86b192f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+#include <stddef.h>
union tree_node;
typedef union tree_node *tree;
@@ -63,7 +64,7 @@ main (void)
for (i = 0; i < 2; i++)
{
unexpanded_var_list = malloc (sizeof (struct tree_list));
- unexpanded_var_list->list.value = (tree) (long unsigned) (i & 1);
+ unexpanded_var_list->list.value = (tree) (ptrdiff_t) (i & 1);
unexpanded_var_list->common.chain = last;
last = unexpanded_var_list;
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c b/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
index d2d99baf0a1..ef5bc6a5341 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
@@ -16,5 +16,5 @@ int foo(void)
return a.i;
}
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "salias" } } */
+/* { dg-final { scan-tree-dump-times "VDEF" 4 "salias" } } */
/* { dg-final { cleanup-tree-dump "salias" } } */
diff --git a/gcc/testsuite/gcc.dg/unsigned-long-compare.c b/gcc/testsuite/gcc.dg/unsigned-long-compare.c
index 1c5c69cf038..74e7638f1ce 100644
--- a/gcc/testsuite/gcc.dg/unsigned-long-compare.c
+++ b/gcc/testsuite/gcc.dg/unsigned-long-compare.c
@@ -6,7 +6,7 @@
expansion emits a function whose return is unbiased and needs
adjustment. */
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
-/* { dg-do run { target arm-*-*eabi* } } */
+/* { dg-do run } */
/* { dg-options "" } */
#include <stdlib.h>