From: Ulrich Weigand Date: Thu, 14 Apr 2005 08:25:00 +0000 (+0000) Subject: re PR target/20927 (ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)) X-Git-Tag: misc/cutover-cvs2svn~4088 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=559be41a519baec62f81099ba904338607c687dd;p=thirdparty%2Fgcc.git re PR target/20927 (ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)) ChangeLog: PR target/20927 * config/s390/s390-modes.def: Define TFmode. testsuite/ChangeLog: PR target/20927 * gcc.dg/pr20927.c: New test. From-SVN: r98128 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0ce72759b7f3..f96cfbd45061 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-14 Ulrich Weigand + + PR target/20927 + * config/s390/s390-modes.def: Define TFmode. + 2005-04-13 Richard Sandiford * config/mips/mips.h (ASM_OUTPUT_CASE_LABEL): Delete. diff --git a/gcc/config/s390/s390-modes.def b/gcc/config/s390/s390-modes.def index 1cb0f199032d..6520dda8e905 100644 --- a/gcc/config/s390/s390-modes.def +++ b/gcc/config/s390/s390-modes.def @@ -23,6 +23,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* 256-bit integer mode is needed for STACK_SAVEAREA_MODE. */ INT_MODE (OI, 32); +/* Define TFmode to work around reload problem PR 20927. */ +FLOAT_MODE (TF, 16, ieee_quad_format); + /* Add any extra modes needed to represent the condition code. */ /* diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b09c5b76a64c..70a01265b71f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-04-14 Ulrich Weigand + + PR target/20927 + * gcc.dg/pr20927.c: New test. + 2005-04-13 Richard Sandiford * gcc.dg/torture/pr19683-1.c: Guard with #ifndef __mips16. diff --git a/gcc/testsuite/gcc.dg/pr20927.c b/gcc/testsuite/gcc.dg/pr20927.c new file mode 100644 index 000000000000..55cda33e8c4b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20927.c @@ -0,0 +1,23 @@ +/* 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); +} +