From: Jose E. Marchesi Date: Mon, 9 Sep 2019 09:49:34 +0000 (+0200) Subject: testsuite: annotate c-torture/compile tests with dg-require-stack-size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9b8025bb071f9980aa54c80e642dc855542fd1b;p=gcc.git testsuite: annotate c-torture/compile tests with dg-require-stack-size This patch annotates tests that make use of a significant a mount of stack space. Embedded and other restricted targets may have problems compiling and running these tests. Note that the annotations are in many cases not exact. testsuite/ChangeLog: * gcc.c-torture/compile/20000609-1.c: Annotate with dg-require-stack-size. * gcc.c-torture/compile/20000804-1.c: Likewise. * gcc.c-torture/compile/20020304-1.c: Likewise. * gcc.c-torture/compile/20020604-1.c: Likewise. * gcc.c-torture/compile/20021015-1.c: Likewise. * gcc.c-torture/compile/20050303-1.c: Likewise. * gcc.c-torture/compile/20060421-1.c: Likewise. * gcc.c-torture/compile/20071207-1.c: Likewise. * gcc.c-torture/compile/20080903-1.c: Likewise. * gcc.c-torture/compile/20121027-1.c: Likewise. * gcc.c-torture/compile/20151204.c: Likewise. * gcc.c-torture/compile/920501-12.c: Likewise. * gcc.c-torture/compile/920501-4.c: Likewise. * gcc.c-torture/compile/920723-1.c: Likewise. * gcc.c-torture/compile/921202-1.c: Likewise. * gcc.c-torture/compile/931003-1.c: Likewise. * gcc.c-torture/compile/931004-1.c: Likewise. * gcc.c-torture/compile/950719-1.c: Likewise. * gcc.c-torture/compile/951222-1.c: Likewise. * gcc.c-torture/compile/990517-1.c: Likewise. * gcc.c-torture/compile/bcopy.c: Likewise. * gcc.c-torture/compile/pr23929.c: Likewise. * gcc.c-torture/compile/pr25310.c: Likewise. * gcc.c-torture/compile/pr34458.c: Likewise. * gcc.c-torture/compile/pr39937.c: Likewise. * gcc.c-torture/compile/pr41181.c: Likewise. * gcc.c-torture/compile/pr41634.c: Likewise. * gcc.c-torture/compile/pr43415.c: Likewise. * gcc.c-torture/compile/pr43417.c: Likewise. * gcc.c-torture/compile/pr44788.c: Likewise. * gcc.c-torture/compile/sound.c: Likewise. From-SVN: r275504 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b3e141657ab..0a8c405e8aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,38 @@ +2019-09-09 Jose E. Marchesi + + * gcc.c-torture/compile/20000609-1.c: Annotate with + dg-require-stack-size. + * gcc.c-torture/compile/20000804-1.c: Likewise. + * gcc.c-torture/compile/20020304-1.c: Likewise. + * gcc.c-torture/compile/20020604-1.c: Likewise. + * gcc.c-torture/compile/20021015-1.c: Likewise. + * gcc.c-torture/compile/20050303-1.c: Likewise. + * gcc.c-torture/compile/20060421-1.c: Likewise. + * gcc.c-torture/compile/20071207-1.c: Likewise. + * gcc.c-torture/compile/20080903-1.c: Likewise. + * gcc.c-torture/compile/20121027-1.c: Likewise. + * gcc.c-torture/compile/20151204.c: Likewise. + * gcc.c-torture/compile/920501-12.c: Likewise. + * gcc.c-torture/compile/920501-4.c: Likewise. + * gcc.c-torture/compile/920723-1.c: Likewise. + * gcc.c-torture/compile/921202-1.c: Likewise. + * gcc.c-torture/compile/931003-1.c: Likewise. + * gcc.c-torture/compile/931004-1.c: Likewise. + * gcc.c-torture/compile/950719-1.c: Likewise. + * gcc.c-torture/compile/951222-1.c: Likewise. + * gcc.c-torture/compile/990517-1.c: Likewise. + * gcc.c-torture/compile/bcopy.c: Likewise. + * gcc.c-torture/compile/pr23929.c: Likewise. + * gcc.c-torture/compile/pr25310.c: Likewise. + * gcc.c-torture/compile/pr34458.c: Likewise. + * gcc.c-torture/compile/pr39937.c: Likewise. + * gcc.c-torture/compile/pr41181.c: Likewise. + * gcc.c-torture/compile/pr41634.c: Likewise. + * gcc.c-torture/compile/pr43415.c: Likewise. + * gcc.c-torture/compile/pr43417.c: Likewise. + * gcc.c-torture/compile/pr44788.c: Likewise. + * gcc.c-torture/compile/sound.c: Likewise. + 2019-09-07 Bernd Edlinger * gcc.target/arm/pr91684.c: Use effective-target arm_prefer_ldrd_strd. diff --git a/gcc/testsuite/gcc.c-torture/compile/20000609-1.c b/gcc/testsuite/gcc.c-torture/compile/20000609-1.c index f03aa35a7ac..e41701cc6d9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20000609-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20000609-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "1024" } */ + int main () { char temp[1024] = "tempfile"; diff --git a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c index 35464c212d2..550669b53a3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c @@ -6,6 +6,7 @@ /* { dg-skip-if "Not enough 64-bit registers" { pdp11-*-* } { "-O0" } { "" } } */ /* { dg-xfail-if "Inconsistent constraint on asm" { csky-*-* } { "-O0" } { "" } } */ /* { dg-xfail-if "" { h8300-*-* } } */ +/* { dg-require-stack-size "99*4+16" } */ /* Copyright (C) 2000, 2003 Free Software Foundation */ __complex__ long long f () diff --git a/gcc/testsuite/gcc.c-torture/compile/20020304-1.c b/gcc/testsuite/gcc.c-torture/compile/20020304-1.c index 3940d5ffd2e..046c5d69c94 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20020304-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20020304-1.c @@ -4,6 +4,8 @@ Original bug report is c/5830 by Manuel Serrano . */ +/* { dg-require-stack-size "513" } */ + typedef union scmobj { struct pair { union scmobj *car; diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c index d2e186a7182..4846f7997a3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ /* { dg-require-effective-target ptr32plus } */ /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */ +/* { dg-require-stack-size "2048*4*4" } */ /* PR c/6957 This testcase ICEd at -O2 on IA-32, because diff --git a/gcc/testsuite/gcc.c-torture/compile/20021015-1.c b/gcc/testsuite/gcc.c-torture/compile/20021015-1.c index 789b8a8b176..9753876c2d7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20021015-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20021015-1.c @@ -1,4 +1,5 @@ /* PR target/7370. */ +/* { dg-require-stack-size "4000 + 8" } */ int g (int *x, int *y); diff --git a/gcc/testsuite/gcc.c-torture/compile/20050303-1.c b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c index 22154b30af5..0261acd2c30 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20050303-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c @@ -1,5 +1,6 @@ /* { dg-require-effective-target int32plus } */ /* { dg-require-effective-target size32plus } */ +/* { dg-require-stack-size "128*1024" } */ void crc() { diff --git a/gcc/testsuite/gcc.c-torture/compile/20060421-1.c b/gcc/testsuite/gcc.c-torture/compile/20060421-1.c index 1bd4079b4c8..05396d3dcc1 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20060421-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20060421-1.c @@ -1,4 +1,6 @@ /* This test used to ICE on ARM with -mcpu=iwmmxt. */ +/* { dg-require-stack-size "249*8+1" } */ + void foo (void) { diff --git a/gcc/testsuite/gcc.c-torture/compile/20071207-1.c b/gcc/testsuite/gcc.c-torture/compile/20071207-1.c index 27b871616b1..fecf5317734 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20071207-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20071207-1.c @@ -1,4 +1,5 @@ /* PR tree-optimization/34371 */ +/* { dg-require-stack-size "1108" } */ /* Testcase by Martin Michlmayr */ void centerln (int width, int ch, char *s) diff --git a/gcc/testsuite/gcc.c-torture/compile/20080903-1.c b/gcc/testsuite/gcc.c-torture/compile/20080903-1.c index 180b926bf3d..d446ebf7c93 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20080903-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20080903-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "4096" } */ + struct bar { unsigned short length; }; int diff --git a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c index 3d3ff31f69b..7c92f3fa436 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "1024+16" } */ + extern int nc; void f(void) { diff --git a/gcc/testsuite/gcc.c-torture/compile/20151204.c b/gcc/testsuite/gcc.c-torture/compile/20151204.c index e41f6c1dca9..a6bac5d7e1f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20151204.c +++ b/gcc/testsuite/gcc.c-torture/compile/20151204.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target size20plus } */ +/* { dg-require-stack-size "32753*2" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-12.c b/gcc/testsuite/gcc.c-torture/compile/920501-12.c index 68892a689df..089de4dcddb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-12.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-12.c @@ -1,5 +1,6 @@ /* { dg-do assemble } */ /* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ +/* { dg-require-stack-size "9999*4" } */ 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 10736ae76a4..2ef54b5d35d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-4.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ /* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */ /* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ +/* { dg-require-stack-size "8196*4" } */ foo () { diff --git a/gcc/testsuite/gcc.c-torture/compile/920723-1.c b/gcc/testsuite/gcc.c-torture/compile/920723-1.c index cd8710be7e8..2d778759e13 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920723-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920723-1.c @@ -1,4 +1,5 @@ /* { dg-add-options stack_size } */ +/* { dg-require-stack-size "75*75*4" } */ #if defined(STACK_SIZE) && STACK_SIZE < 65536 # define GITT_SIZE 75 diff --git a/gcc/testsuite/gcc.c-torture/compile/921202-1.c b/gcc/testsuite/gcc.c-torture/compile/921202-1.c index 1287edc57b8..d97ddf6144e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/921202-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/921202-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "2055*3*8" } */ + f () { long dx[2055]; diff --git a/gcc/testsuite/gcc.c-torture/compile/931003-1.c b/gcc/testsuite/gcc.c-torture/compile/931003-1.c index 922b14379c9..637b9aa6d26 100644 --- a/gcc/testsuite/gcc.c-torture/compile/931003-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/931003-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "52*8" } */ + f (n, a) int n; double a[]; diff --git a/gcc/testsuite/gcc.c-torture/compile/931004-1.c b/gcc/testsuite/gcc.c-torture/compile/931004-1.c index 0e741fd4ac0..d5796cee97d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/931004-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/931004-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "4*4*2*80" } */ + #define A "This is a long test that tests the structure initialization" #define B A,A #define C B,B,B,B diff --git a/gcc/testsuite/gcc.c-torture/compile/950719-1.c b/gcc/testsuite/gcc.c-torture/compile/950719-1.c index d3277fada4e..e1ac117daeb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/950719-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/950719-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "4092+4" } */ + typedef struct { int Header; diff --git a/gcc/testsuite/gcc.c-torture/compile/951222-1.c b/gcc/testsuite/gcc.c-torture/compile/951222-1.c index b8246f5fe81..f1818e322cf 100644 --- a/gcc/testsuite/gcc.c-torture/compile/951222-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/951222-1.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "10000+3*8" } */ + extern long long foo (); long long diff --git a/gcc/testsuite/gcc.c-torture/compile/990517-1.c b/gcc/testsuite/gcc.c-torture/compile/990517-1.c index c738d4be760..afdd844e305 100644 --- a/gcc/testsuite/gcc.c-torture/compile/990517-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/990517-1.c @@ -1,4 +1,7 @@ /* Extracted from the sdm module in perl. */ + +/* { dg-require-stack-size "12*2+8+1024+8" } */ + typedef struct { char *dptr; int dsize; diff --git a/gcc/testsuite/gcc.c-torture/compile/bcopy.c b/gcc/testsuite/gcc.c-torture/compile/bcopy.c index 8108f296600..fce95c842f3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/bcopy.c +++ b/gcc/testsuite/gcc.c-torture/compile/bcopy.c @@ -1,4 +1,5 @@ /* { dg-add-options stack_size } */ +/* { dg-require-stack-size "[dg-effective-target-value stack_size]*2" } */ void bcopy1 (s, d, c) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23929.c b/gcc/testsuite/gcc.c-torture/compile/pr23929.c index 210bb585e06..2ec658421d9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr23929.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr23929.c @@ -1,4 +1,5 @@ /* PR tree-optimization/23929 */ +/* { dg-require-stack-size "2048+8" } */ extern void bar (char *); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25310.c b/gcc/testsuite/gcc.c-torture/compile/pr25310.c index 54695e05b4f..7bdd0c574bd 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr25310.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr25310.c @@ -1,4 +1,5 @@ /* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */ +/* { dg-require-stack-size "65536+20" } */ /* Prevent spurious test failures on 16-bit targets. */ #if __INT_MAX__ >= 2147483647L diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34458.c b/gcc/testsuite/gcc.c-torture/compile/pr34458.c index 096cc0c9b89..77154937a63 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr34458.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr34458.c @@ -1,4 +1,5 @@ /* Testcase by Martin Michlmayr */ +/* { dg-require-stack-size "1025*4" } */ typedef struct { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39937.c b/gcc/testsuite/gcc.c-torture/compile/pr39937.c index d0231053258..df280535f1f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr39937.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr39937.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "4096" } */ + int foo (__const char *__restrict __s); static void read_anisou(char line[]) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41181.c b/gcc/testsuite/gcc.c-torture/compile/pr41181.c index f866249b605..4e12d374681 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr41181.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr41181.c @@ -1,5 +1,7 @@ /* { dg-require-effective-target ptr32plus } */ /* { dg-skip-if "The array is too big" { "avr-*-*" "pdp11-*-*" } } */ +/* { dg-require-stack-size "250*250" } */ + char paths[1024]; static void x264_slicetype_path(char (*best_paths)[250], int n, int length) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41634.c b/gcc/testsuite/gcc.c-torture/compile/pr41634.c index 976e463e2ba..afad6d211bb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr41634.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr41634.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "2*512 + 256" } */ + extern int _xgetw(); extern int foo(char*); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43415.c b/gcc/testsuite/gcc.c-torture/compile/pr43415.c index c00e1c41ce9..66afe99a06b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr43415.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr43415.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "256*8+4" } */ + int main() { unsigned long long table[256]; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43417.c b/gcc/testsuite/gcc.c-torture/compile/pr43417.c index 45bf053a0cb..5ae98be35b3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr43417.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr43417.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "1004*4+2*8" } */ + int pid_count = 0; unsigned int getopt (int, const char**, const char*); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44788.c b/gcc/testsuite/gcc.c-torture/compile/pr44788.c index 99dc7982394..b570f65ff92 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr44788.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr44788.c @@ -1,3 +1,5 @@ +/* { dg-require-stack-size "1060*4+4" } */ + void joint_decode(float* mlt_buffer1, int t) { int i; float decode_buffer[1060]; diff --git a/gcc/testsuite/gcc.c-torture/compile/sound.c b/gcc/testsuite/gcc.c-torture/compile/sound.c index be727e3febb..66e24a00f68 100644 --- a/gcc/testsuite/gcc.c-torture/compile/sound.c +++ b/gcc/testsuite/gcc.c-torture/compile/sound.c @@ -1,3 +1,4 @@ +/* { dg-require-stack-size "8192+4" } */ main () {