]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/51044 (gfortran.dg/alloc_comp_class_2.f90 gfortran.dg/widecha...
authorJakub Jelinek <jakub@redhat.com>
Wed, 30 Nov 2011 22:02:14 +0000 (23:02 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 30 Nov 2011 22:02:14 +0000 (23:02 +0100)
PR rtl-optimization/51044
* dse.c (emit_inc_dec_insn_before): Ensure new_insn is an instruction
rather than just insn body.

From-SVN: r181861

gcc/ChangeLog
gcc/dse.c

index 66093b15d5b86c6be294f18454c64d004301332b..1e06e7f516f973865979d4e0bce45e648af9efc1 100644 (file)
@@ -1,5 +1,9 @@
 2011-11-30  Jakub Jelinek  <jakub@redhat.com>
 
+       PR rtl-optimization/51044
+       * dse.c (emit_inc_dec_insn_before): Ensure new_insn is an instruction
+       rather than just insn body.
+
        PR target/50725
        * function.c (thread_prologue_and_epilogue_insns): If
        stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE
index ddabd3de0c6a86dd9536595df8268184542696e4..13d2f27ca2373c5d8b13b6c41b57bc5c62d95915 100644 (file)
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -895,7 +895,12 @@ emit_inc_dec_insn_before (rtx mem ATTRIBUTE_UNUSED,
   /* We can reuse all operands without copying, because we are about
      to delete the insn that contained it.  */
   if (srcoff)
-    new_insn = gen_add3_insn (dest, src, srcoff);
+    {
+      start_sequence ();
+      emit_insn (gen_add3_insn (dest, src, srcoff));
+      new_insn = get_insns ();
+      end_sequence ();
+    }
   else
     new_insn = gen_move_insn (dest, src);
   info.first = new_insn;