From: Paul Koning Date: Fri, 22 Jun 2018 14:34:37 +0000 (-0400) Subject: Fix test case failures for pdp11 target. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7393e5de78991bbf092379a9f2df1cff10bfb043;p=gcc.git Fix test case failures for pdp11 target. * 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. From-SVN: r261897 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 655a4405b41..b3bb851c8ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2018-06-22 Paul Koning + + * 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. + 2018-06-22 Cesar Philippidis James Norris Thomas Schwinge diff --git a/gcc/testsuite/gcc.c-torture/compile/20010518-2.c b/gcc/testsuite/gcc.c-torture/compile/20010518-2.c index 9ff50474223..0a1bb74f9b1 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20010518-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/20010518-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ /* Large static storage. */ diff --git a/gcc/testsuite/gcc.c-torture/compile/20040101-1.c b/gcc/testsuite/gcc.c-torture/compile/20040101-1.c index baa0e4f93e1..5c2688ad830 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20040101-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20040101-1.c @@ -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; diff --git a/gcc/testsuite/gcc.c-torture/compile/20050622-1.c b/gcc/testsuite/gcc.c-torture/compile/20050622-1.c index db183909f40..829f9dd857d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20050622-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20050622-1.c @@ -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 diff --git a/gcc/testsuite/gcc.c-torture/compile/20080625-1.c b/gcc/testsuite/gcc.c-torture/compile/20080625-1.c index 4b3b7c2c142..33e2d63508d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20080625-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20080625-1.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target int32plus } */ +/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ struct peakbufStruct { unsigned int lnum [5000]; diff --git a/gcc/testsuite/gcc.c-torture/compile/20090107-1.c b/gcc/testsuite/gcc.c-torture/compile/20090107-1.c index b5d4c1a4466..75a80fdfff9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20090107-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20090107-1.c @@ -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). */ diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-12.c b/gcc/testsuite/gcc.c-torture/compile/920501-12.c index 383c7182df2..68892a689df 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-12.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-12.c @@ -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;} diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-4.c b/gcc/testsuite/gcc.c-torture/compile/920501-4.c index 362f2b764d8..10736ae76a4 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-4.c @@ -1,5 +1,6 @@ /* { dg-do assemble } */ /* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */ +/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ foo () { diff --git a/gcc/testsuite/gcc.c-torture/compile/961203-1.c b/gcc/testsuite/gcc.c-torture/compile/961203-1.c index 98908584333..91823524a2e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/961203-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/961203-1.c @@ -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 { diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c b/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c index c2338491b4f..d3828015a75 100644 --- a/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c +++ b/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c @@ -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. */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25310.c b/gcc/testsuite/gcc.c-torture/compile/pr25310.c index 71081d82111..54695e05b4f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr25310.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr25310.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ /* Prevent spurious test failures on 16-bit targets. */ #if __INT_MAX__ >= 2147483647L diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c index b19d7bf813f..fd9e6015faa 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c @@ -3,10 +3,18 @@ #include #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;