]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/20927 (ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x))
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 14 Apr 2005 08:25:00 +0000 (08:25 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Thu, 14 Apr 2005 08:25:00 +0000 (08:25 +0000)
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

gcc/ChangeLog
gcc/config/s390/s390-modes.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr20927.c [new file with mode: 0644]

index 0ce72759b7f3304c39ba85c072962286147adad5..f96cfbd45061b69aaa8d0a497b3f90a79a74dc76 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-14  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       PR target/20927
+       * config/s390/s390-modes.def: Define TFmode.
+
 2005-04-13  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mips/mips.h (ASM_OUTPUT_CASE_LABEL): Delete.
index 1cb0f199032d2ee4473f0d11c48db0d0a094c8cc..6520dda8e9052510e1c296adc3bc90123f44b082 100644 (file)
@@ -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.  */
 
 /*
index b09c5b76a64c128c1922decbf6b61b345be09c7d..70a01265b71f382b6ed85eedf776b8241b990550 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-14  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       PR target/20927
+       * gcc.dg/pr20927.c: New test.
+
 2005-04-13  Richard Sandiford  <rsandifo@redhat.com>
 
        * 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 (file)
index 0000000..55cda33
--- /dev/null
@@ -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);
+}
+