Hello Ian, > In that case, just comment out the bulk of the test based on > STACK_SIZE.
Ok. How about that patch? It should be ok until someone digs out a target with a stack size below 64 bytes ;) (plus the bytes for the other auto variables). I've decided not to disable the testcase completely for small stack sizes. Although it is unlikely that it triggers the reload problem in some way the testcase is weird enough to trigger something else. Ok for mainline? Bye, -Andreas- Index: gcc/testsuite/gcc.c-torture/compile/20080806-1.c =================================================================== *** /dev/null 1970-01-01 00:00:00.000000000 +0000 --- gcc/testsuite/gcc.c-torture/compile/20080806-1.c 2008-08-08 09:16:01.000000000 +0200 *************** *** 0 **** --- 1,41 ---- + /* This used to ICE on s390x due to a reload bug. */ + + #if defined(STACK_SIZE) && (STACK_SIZE < 65536) + #define BYTES 64 + #else + #define BYTES 65400 + #endif + + int gl2; + typedef __SIZE_TYPE__ size_t; + + extern void *memcpy (void *dest, const void *src, size_t n); + + void + f1 () + { + int i2; + unsigned char bf[BYTES]; + + for (i2 = 0; i2 < 3; i2++) + { + unsigned char *p2 = bf; + unsigned char *p3 = ((void *) 0); + unsigned short ctf2; + + p2 += sizeof (short); + + for (ctf2 = 0; ctf2 < 3; ctf2++) + { + if (ctf2 == 1) + { + unsigned short of = p2 - bf - 6; + unsigned short *ofp = (unsigned short *) &of; + memcpy (p3, ofp, sizeof (short)); + } + + if (gl2 == 1) + p2 += 3; + } + } + } Index: gcc/testsuite/gcc.target/s390/20080806-1.c =================================================================== *** gcc/testsuite/gcc.target/s390/20080806-1.c 2008-08-08 09:06:30.000000000 +0200 --- /dev/null 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,38 **** - /* This used to ICE on s390x due to a reload bug. */ - - /* { dg-do compile } */ - /* { dg-options "-O2" } */ - - int gl2; - typedef __SIZE_TYPE__ size_t; - - extern void *memcpy (void *dest, const void *src, size_t n); - - void - f1 () - { - int i2; - unsigned char bf[64 * 1024 + 4]; - - for (i2 = 0; i2 < 3; i2++) - { - unsigned char *p2 = bf; - unsigned char *p3 = ((void *) 0); - unsigned short ctf2; - - p2 += sizeof (short); - - for (ctf2 = 0; ctf2 < 3; ctf2++) - { - if (ctf2 == 1) - { - unsigned short of = p2 - bf - 6; - unsigned short *ofp = (unsigned short *) &of; - memcpy (p3, ofp, sizeof (short)); - } - - if (gl2 == 1) - p2 += 3; - } - } - } --- 0 ----