+2007-08-23 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/s390: New directory.
+ * gcc.target/s390/s390.exp: New file.
+ * gcc.dg/20020926-1.c, gcc.dg/20030123-1.c, gcc.dg/20030129-1.c,
+ gcc.dg/20040305-1.c, gcc.dg/20041109-1.c, gcc.dg/20041216-1.c,
+ gcc.dg/20050409-1.c, gcc.dg/20050524-1.c, gcc.dg/20050824-1.c,
+ gcc.dg/pr20927.c, gcc.dg/pr24624.c, gcc.dg/pr27661.c: Move to
+ gcc.target/s390 directory.
+
2007-08-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/32328
2007-03-20 Pawel Sikora <pluto@pld-linux.org>
- * g++.dg/warn/Wnvdtor-2.C: New testcase.
+ * g++.dg/warn/Wnvdtor-2.C: New testcase.
2007-08-20 Dorit Nuzman <dorit@il.ibm.com>
* gcc.dg/vect/vect-outer-6.c: New test.
* gcc.dg/vect/vect-outer-fir.c: New test.
* gcc.dg/vect/vect-outer-fir-lb.c: New test.
- * gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: New test.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: New test.
2007-08-19 Dorit Nuzman <dorit@il.ibm.com>
versioning for aliasing).
* testsuite/gcc.dg/vect/vect-35.c: Likewise.
- * testsuite/gcc.dg/vect/vect-iv-6.c: Fix test for vect_no_align targets.
+ * testsuite/gcc.dg/vect/vect-iv-6.c: Fix test for vect_no_align
+ targets.
* testsuite/gcc.dg/vect/vect-multitypes-11.c: Likewise.
2007-08-18 Tom Tromey <tromey@redhat.com>
PR middle-end/32813
* gfortran.fortran-torture/compile/emptyif-1.f90: New test.
- * lib/fortran-torture.exp (fortran-torture): Use TORTURE_OPTIONS instead
- of just -O.
+ * lib/fortran-torture.exp (fortran-torture): Use TORTURE_OPTIONS
+ instead of just -O.
2007-08-08 Richard Sandiford <richard@codesourcery.com>
* gfortran.dg/vect-5.f90: Likewise.
* lib/target-supports.exp (check_effective_target_natural_alignment):
Return false for darwin.
- (check_effective_target_vector_alignment_reachable_for_double): New.
+ (check_effective_target_vector_alignment_reachable_for_double): New.
2007-08-07 Andreas Krebbel <krebbel1@de.ibm.com>
* gfortran.dg/isnan_1.f90: New test.
2007-08-05 Vladimir Yanovsky <yanov@il.ibm.com>
- Revital Eres <eres@il.ibm.com>
+ Revital Eres <eres@il.ibm.com>
* gcc.dg/sms-antideps.c: New test.
* gfortran.dg/entry_11.f90: New test.
2007-07-29 Vladimir Yanovsky <yanov@il.ibm.com>
- Revital Eres <eres@il.ibm.com>
+ Revital Eres <eres@il.ibm.com>
* gfortran.dg/sms-1.f90: New test.
2007-07-16 Sandra Loosemore <sandra@codesourcery.com>
David Ung <davidu@mips.com>
- * gcc.target/mips/mips-sched-madd.c: New test case.
+ * gcc.target/mips/mips-sched-madd.c: New test case.
2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+++ /dev/null
-/* 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" } } */
-
+++ /dev/null
-/* 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);
-}
-
+++ /dev/null
-/* 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);
-}
-
+++ /dev/null
-
-/* 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 ();
-}
+++ /dev/null
-/* 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;
-}
-
+++ /dev/null
-/* 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;
-}
-
+++ /dev/null
-/* 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;
-}
-
+++ /dev/null
-/* 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;
-}
-
+++ /dev/null
-/* 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));
-}
+++ /dev/null
-/* 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);
-}
-
+++ /dev/null
-/* 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++);
-}
+++ /dev/null
-/* 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");
-}
-
--- /dev/null
+/* Make sure that LEGITIMIZE_ADDRESS is called to handle
+ negative displacements. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -mesa" } */
+
+int test (int *addr)
+{
+ return *(addr - 1);
+}
+
+/* { dg-final { scan-assembler "-4096" } } */
+/* { dg-final { scan-assembler-not "ahi" } } */
+
--- /dev/null
+/* This used to ICE due to a reload bug on s390*. */
+
+/* { dg-do compile } */
+/* { 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);
+}
+
--- /dev/null
+/* This used to ICE due to a reload bug on s390*. */
+
+/* { dg-do compile } */
+/* { 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);
+}
+
--- /dev/null
+
+/* 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 } */
+/* { 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 ();
+}
--- /dev/null
+/* This used to ICE due to a literal pool handling bug on s390x. */
+
+/* { dg-do compile } */
+/* { 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;
+}
+
--- /dev/null
+/* This test case would get an unresolved symbol during link
+ because stabs referred to an optimized-away literal pool
+ entry. */
+
+/* { dg-do run } */
+/* { 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;
+}
+
--- /dev/null
+/* This used to ICE due to a regmove problem on s390. */
+
+/* { dg-do compile } */
+/* { 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;
+}
+
--- /dev/null
+/* This test case used to abort due to a reload bug with
+ elimination offsets. */
+
+/* { dg-do run } */
+/* { 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;
+}
+
--- /dev/null
+/* Make sure that the S/390 specific shift_count_operand
+ predicate work properly. */
+
+/* { dg-do compile } */
+/* { 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));
+}
--- /dev/null
+/* This caused an ICE on s390x due to a reload inheritance bug. */
+
+/* { dg-do compile } */
+/* { 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);
+}
+
--- /dev/null
+/* This used to ICE due to a backend problem on s390. */
+
+/* { dg-do compile } */
+/* { 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++);
+}
--- /dev/null
+/* This used to ICE on s390 due to a reload bug. */
+
+/* { dg-do compile } */
+/* { 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");
+}
+
--- /dev/null
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a s390 target.
+if ![istarget s390*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish