This patch fixes a number of test suite failures caused by data too large for 
the address space or alignment larger than supported by this target.

        paul

testsuite/ChangeLog:

2018-06-22  Paul Koning  <n...@arrl.net>

        * gcc.c-torture/execute/builtins/lib/chk.c: Use smaller alignment
        if pdp11.
        * gcc.c-torture/compile/20010518-2.c: Skip if pdp11 -mint32.
        * gcc.c-torture/compile/20040101-1.c: Ditto.
        * gcc.c-torture/compile/20050622-1.c: Ditto.
        * gcc.c-torture/compile/20080625-1.c: Ditto.
        * gcc.c-torture/compile/20090107-1.c: Ditto.
        * gcc.c-torture/compile/920501-12.c: Ditto.
        * gcc.c-torture/compile/920501-4.c: Ditto.
        * gcc.c-torture/compile/961203-1.c: Ditto.
        * gcc.c-torture/compile/limits-externdecl.c: Ditto.
        * gcc.c-torture/compile/pr25310.c: Ditto.

Index: testsuite/gcc.c-torture/execute/builtins/lib/chk.c
===================================================================
--- testsuite/gcc.c-torture/execute/builtins/lib/chk.c  (revision 261896)
+++ testsuite/gcc.c-torture/execute/builtins/lib/chk.c  (revision 261897)
@@ -3,10 +3,18 @@
 #include <sys/types.h>
 #endif
 
+/* If some target has a Max alignment less than 16, please create
+   a #ifdef around the alignment and add your alignment.  */
+#ifdef __pdp11__
+#define ALIGNMENT 2
+#else
+#define ALIGNMENT 16
+#endif
+
 extern void abort (void);
 
 extern int inside_main;
-void *chk_fail_buf[256] __attribute__((aligned (16)));
+void *chk_fail_buf[256] __attribute__((aligned (ALIGNMENT)));
 volatile int chk_fail_allowed, chk_calls;
 volatile int memcpy_disallowed, mempcpy_disallowed, memmove_disallowed;
 volatile int memset_disallowed, strcpy_disallowed, stpcpy_disallowed;
Index: testsuite/gcc.c-torture/compile/920501-4.c
===================================================================
--- testsuite/gcc.c-torture/compile/920501-4.c  (revision 261896)
+++ testsuite/gcc.c-torture/compile/920501-4.c  (revision 261897)
@@ -1,5 +1,6 @@
 /* { dg-do assemble } */
 /* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 foo ()
 {
Index: testsuite/gcc.c-torture/compile/20080625-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20080625-1.c        (revision 261896)
+++ testsuite/gcc.c-torture/compile/20080625-1.c        (revision 261897)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target int32plus } */
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 struct peakbufStruct {
     unsigned int lnum [5000];
Index: testsuite/gcc.c-torture/compile/20040101-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20040101-1.c        (revision 261896)
+++ testsuite/gcc.c-torture/compile/20040101-1.c        (revision 261897)
@@ -1,4 +1,4 @@
-/* { dg-skip-if "not enough registers" { pdp11-*-* } { "-O[12s]" } { "" } } */
+/* { dg-skip-if "not enough registers" { pdp11-*-* } } */
 
 typedef unsigned short uint16_t;
 typedef unsigned int uint32_t;
Index: testsuite/gcc.c-torture/compile/20090107-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20090107-1.c        (revision 261896)
+++ testsuite/gcc.c-torture/compile/20090107-1.c        (revision 261897)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
+
 /* Verify that we don't ICE by forming invalid addresses for unaligned
    doubleword loads (originally for PPC64).  */
 
Index: testsuite/gcc.c-torture/compile/20010518-2.c
===================================================================
--- testsuite/gcc.c-torture/compile/20010518-2.c        (revision 261896)
+++ testsuite/gcc.c-torture/compile/20010518-2.c        (revision 261897)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 /* Large static storage.  */
 
Index: testsuite/gcc.c-torture/compile/920501-12.c
===================================================================
--- testsuite/gcc.c-torture/compile/920501-12.c (revision 261896)
+++ testsuite/gcc.c-torture/compile/920501-12.c (revision 261897)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 x(x){            return 3 + x;}
 a(x){int y[994]; return 3 + x;}
Index: testsuite/gcc.c-torture/compile/limits-externdecl.c
===================================================================
--- testsuite/gcc.c-torture/compile/limits-externdecl.c (revision 261896)
+++ testsuite/gcc.c-torture/compile/limits-externdecl.c (revision 261897)
@@ -1,4 +1,5 @@
 /* { dg-skip-if "ptxas runs out of memory" { nvptx-*-* } } */
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 /* { dg-require-effective-target int32plus } */
 /* Inspired by the test case for PR middle-end/52640.  */
Index: testsuite/gcc.c-torture/compile/20050622-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20050622-1.c        (revision 261896)
+++ testsuite/gcc.c-torture/compile/20050622-1.c        (revision 261897)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
+
 #if __SCHAR_MAX__ == 127 && __INT_MAX__ >= 2147483647
 struct S { char buf[72*1024*1024]; };
 #else
Index: testsuite/gcc.c-torture/compile/pr25310.c
===================================================================
--- testsuite/gcc.c-torture/compile/pr25310.c   (revision 261896)
+++ testsuite/gcc.c-torture/compile/pr25310.c   (revision 261897)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 /* Prevent spurious test failures on 16-bit targets.  */
 #if __INT_MAX__ >= 2147483647L
Index: testsuite/gcc.c-torture/compile/961203-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/961203-1.c  (revision 261896)
+++ testsuite/gcc.c-torture/compile/961203-1.c  (revision 261897)
@@ -1,6 +1,7 @@
 /* The structure is too large for the xstormy16 - won't fit in 16
    bits.  */
 /* { dg-do assemble } */
+/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
 
 #if __INT_MAX__ >= 2147483647L
 struct s {

Reply via email to