]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/34215 (ICE in assign_386_stack_local, at config/i386/i386.c:13481)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 26 Nov 2007 14:22:59 +0000 (15:22 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 26 Nov 2007 14:22:59 +0000 (15:22 +0100)
PR target/34215
* config/i386/i386.md (truncdfsf2): Select SLOT_TEMP stack slot if
virtual registers are instantiated.
(truncxfsf2): Ditto.
(truncxfdf2): Ditto.

testsuite/ChangeLog:

PR target/34215
* gcc.target/i386/pr34215.c: New test.

From-SVN: r130439

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr34215.c [new file with mode: 0644]

index 9541b91049b5e622c5df77312eeb29d9ca559078..6f8ce0e54a4b459f219f9cb7640d33845afb32bd 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-26  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/34215
+       * config/i386/i386.md (truncdfsf2): Select SLOT_TEMP stack slot if
+       virtual registers are instantiated.
+       (truncxfsf2): Ditto.
+       (truncxfdf2): Ditto.
+
 2007-11-22  Matthias Klose  <doko@ubuntu.com>
 
        Backport from mainline:
index c69c3df4c5c606f0ad368edb09ffd4af8407b23e..d889f2e3efce817797766d0b30fdffc2da3f5430 100644 (file)
     ;
   else
     {
-      rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL);
+      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+      rtx temp = assign_386_stack_local (SFmode, slot);
       emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
       DONE;
     }
       DONE;
     }
   else
-    operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL);
+    {
+      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+      operands[2] = assign_386_stack_local (SFmode, slot);
+    }
 })
 
 (define_insn "*truncxfsf2_mixed"
       DONE;
     }
   else
-    operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL);
+    {
+      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+      operands[2] = assign_386_stack_local (DFmode, slot);
+    }
 })
 
 (define_insn "*truncxfdf2_mixed"
index 88df27b9d7d301c7f86178a40a2717621fb45546..85789e97743ef8b87c15ec9a59ff515d187fb2f2 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-26  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/34215
+       * gcc.target/i386/pr34215.c: New test.
+
 2007-11-22  Matthias Klose  <doko@ubuntu.com>
 
        Backport from mainline:
diff --git a/gcc/testsuite/gcc.target/i386/pr34215.c b/gcc/testsuite/gcc.target/i386/pr34215.c
new file mode 100644 (file)
index 0000000..a902e96
--- /dev/null
@@ -0,0 +1,18 @@
+/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
+
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-O2" } */
+
+double pow (double, double);
+
+void calc_score_dist (int mxdlen, long double d, long double **dist)
+{
+  unsigned long i, scr2;
+  for (i = 1; i <= mxdlen; i++)
+    {
+      for (scr2 = mxdlen; scr2 <= mxdlen + 10; scr2++)
+       {
+       }
+      dist[i][scr2] *= pow (1.0 / d, i);
+    }
+}