Patchwork Cleaning up expand optabs code

login
register
mail settings
Submitter Richard Sandiford
Date March 24, 2011, 3:14 p.m.
Message ID <g4bp10v9dp.fsf@linaro.org>
Download mbox | patch
Permalink /patch/88213/
State New
Headers show

Comments

Richard Sandiford - March 24, 2011, 3:14 p.m.
This showed up as a warning during the h8300 build I did this morning.
I've no idea why it wasn't caught during the x86_64, ARM and MIPS testing.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Installed as obvious.

Richard


gcc/
	* builtins.c (expand_movstr): Fix endp == 1 adjustment after
	last commit.

Patch

Index: gcc/builtins.c
===================================================================
--- gcc/builtins.c	2011-03-23 09:30:17.000000000 +0000
+++ gcc/builtins.c	2011-03-24 09:08:05.000000000 +0000
@@ -3655,7 +3655,6 @@  expand_builtin_mempcpy_args (tree dest, 
 expand_movstr (tree dest, tree src, rtx target, int endp)
 {
   struct expand_operand ops[3];
-  rtx end;
   rtx dest_mem;
   rtx src_mem;
 
@@ -3683,7 +3682,7 @@  expand_movstr (tree dest, tree src, rtx 
 	 adjust it.  */
       if (endp == 1)
 	{
-	  rtx tem = plus_constant (gen_lowpart (GET_MODE (target), end), 1);
+	  rtx tem = plus_constant (gen_lowpart (GET_MODE (target), target), 1);
 	  emit_move_insn (target, force_operand (tem, NULL_RTX));
 	}
     }