Cleaning up expand optabs code

Richard Sandiford richard.sandiford@linaro.org
Thu Mar 24 15:14:00 GMT 2011


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.

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));
 	}
     }



More information about the Gcc-patches mailing list