re PR target/34215 (ICE in assign_386_stack_local, at config/i386/i386.c:13481)
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 26 Nov 2007 15:52:57 +0000 (16:52 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 26 Nov 2007 15:52:57 +0000 (16:52 +0100)
        PR target/34215
        * config/i386/i386.md (truncdfsf2): Select SLOT_TEMP stack slot if
        virtual registers are instantiated.
        (truncxf<mode>2): Ditto.
        (floatsi<mode>2): Ditto.
        (floatdisf2): Ditto.
        (floatdidf2): Ditto.

testsuite/ChangeLog:

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

From-SVN: r130440

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

index 6f273449f5102894d93ce0938a349ad720e8d0c2..acdc3d16223360707294732afe48489414bf3d35 100644 (file)
@@ -1,3 +1,13 @@
+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.
+       (truncxf<mode>2): Ditto.
+       (floatsi<mode>2): Ditto.
+       (floatdisf2): Ditto.
+       (floatdidf2): Ditto.
+
 2007-11-26  Rask Ingemann Lambertsen  <rask@sygehus.dk>
 
        PR target/34174
@@ -66,8 +76,7 @@
 
 2007-11-25  Richard Guenther  <rguenther@suse.de>
 
-       * tree.h (struct tree_block): Move locus member next to
-       flags.
+       * tree.h (struct tree_block): Move locus member next to flags.
        * c-decl.c (SCOPE_LIST_APPEND): Use BLOCK_CHAIN.
        (SCOPE_LIST_CONCAT): Likewise.
        (pop_scope): Likewise.
        register that dies there.
 
 2007-11-23  Dirk Mueller  <dmueller@suse.de>
-       Richard Guenther <rguenther@suse.de>
+           Richard Guenther <rguenther@suse.de>
 
        PR middle-end/34197
        * tree-vrp.c (check_array_ref): Move check for valid location..
        outer_code.
 
 2007-11-23  Richard Guenther  <rguenther@suse.de>
-       Michael Matz  <matz@suse.de>
+           Michael Matz  <matz@suse.de>
 
        PR tree-optimization/34176
        * alloc-pool.h (empty_alloc_pool): Declare.
 
 2007-11-23  Richard Guenther  <rguenther@suse.de>
 
-       * tree-ssa-copy.c (may_propagate_copy): Remove redundant
-       checks.
+       * tree-ssa-copy.c (may_propagate_copy): Remove redundant checks.
        (merge_alias_info): Do verification only if checking is
-       enabled.  Merge flow-sensitive alias information in simple
-       cases.
+       enabled.  Merge flow-sensitive alias information in simple cases.
        * tree-ssa-operands.c (get_addr_dereference_operands): Also
        complain about missing NMTs.
 
 
 2007-11-22  Kaz Kojima  <kkojima@gcc.gnu.org>
 
-       * config/sh/sh.md (divsi_inv_m3): Handle zero dividend
-       specially.
+       * config/sh/sh.md (divsi_inv_m3): Handle zero dividend specially.
 
 2007-11-22  Uros Bizjak  <ubizjak@gmail.com>
 
index 4580afc4fa164c1a8a8d06a0c2f21cc0a9854b1e..9b03b95e4d9c21a46203b47a9e08789d442ea1e2 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 (<MODE>mode, SLOT_VIRTUAL);
+    {
+      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+      operands[2] = assign_386_stack_local (<MODE>mode, slot);
+    }
 })
 
 (define_insn "*truncxfsf2_mixed"
          operands[1] = force_reg (SImode, operands[1]);
        else if (!MEM_P (operands[1]))
         {
-          rtx tmp = assign_386_stack_local (SImode, SLOT_VIRTUAL);
+          int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+          rtx tmp = assign_386_stack_local (SImode, slot);
           emit_move_insn (tmp, operands[1]);
           operands[1] = tmp;
         }
            && !optimize_size
            && !MEM_P (operands[1]))
      {
-       rtx tmp = assign_386_stack_local (GET_MODE (operands[1]), SLOT_VIRTUAL);
-       emit_move_insn (tmp, operands[1]);
-       operands[1] = tmp;
+       int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+       rtx tmp = assign_386_stack_local (GET_MODE (operands[1]), slot);
+       emit_move_insn (tmp, operands[1]);
+       operands[1] = tmp;
      }
   ")
 
       && !optimize_size
       && !MEM_P (operands[1]))
     {
-       rtx tmp = assign_386_stack_local (GET_MODE (operands[1]), SLOT_VIRTUAL);
-       emit_move_insn (tmp, operands[1]);
-       operands[1] = tmp;
+      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+      rtx tmp = assign_386_stack_local (GET_MODE (operands[1]), slot);
+      emit_move_insn (tmp, operands[1]);
+      operands[1] = tmp;
     }
 })
 
       && !optimize_size
       && !MEM_P (operands[1]))
     {
-       rtx tmp = assign_386_stack_local (GET_MODE (operands[1]), SLOT_VIRTUAL);
-       emit_move_insn (tmp, operands[1]);
-       operands[1] = tmp;
+      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+      rtx tmp = assign_386_stack_local (GET_MODE (operands[1]), slot);
+      emit_move_insn (tmp, operands[1]);
+      operands[1] = tmp;
     }
 })
 
index d45e36f015927082df141634455ef9fbd16f9882..a67d239753526ad33cc813ff1e617e1a74273c34 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-26  Rask Ingemann Lambertsen  <rask@sygehus.dk>
 
        PR target/34174
@@ -89,7 +94,7 @@
        * g++.dg/warn/pr33160.C: New.
        
 2007-11-23  Richard Guenther  <rguenther@suse.de>
-       Michael Matz  <matz@suse.de>
+           Michael Matz  <matz@suse.de>
 
        PR tree-optimization/34176
        * gcc.c-torture/execute/pr34176.c: New testcase.
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..9e194ff
--- /dev/null
@@ -0,0 +1,19 @@
+/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target 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);
+    }
+}