Patchwork [obv,fr30] fix some warnings in fr30.c

login
register
mail settings
Submitter Nathan Froyd
Date Aug. 31, 2010, 3 p.m.
Message ID <20100831150055.GY16898@codesourcery.com>
Download mbox | patch
Permalink /patch/63275/
State New
Headers show

Comments

Nathan Froyd - Aug. 31, 2010, 3 p.m.
Noticed while testing other things:

gcc/config/fr30/fr30.c: In function ‘fr30_move_double’:
gcc/config/fr30/fr30.c:885: warning: ISO C90 forbids mixed declarations and code
gcc/config/fr30/fr30.c:886: warning: ISO C90 forbids mixed declarations and code
gcc/config/fr30/fr30.c:883: warning: unused variable ‘dregno’

dregno is truly dead, its last use was deleted by:

2007-11-26  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/34174
	* config/fr30/fr30.c (fr30_move_double): Sanitize mem->reg case. Copy
	the address before it is clobbered.

Fixed like so.  Committed.

-Nathan

	* config/fr30/fr30.c (fr30_move_double): Delete `dregno' and extra
	semicolons.

Patch

Index: config/fr30/fr30.c
===================================================================
--- config/fr30/fr30.c	(revision 163673)
+++ config/fr30/fr30.c	(working copy)
@@ -844,9 +844,8 @@  fr30_move_double (rtx * operands)
       else if (src_code == MEM)
 	{
 	  rtx addr = XEXP (src, 0);
-	  int dregno = REGNO (dest);
-	  rtx dest0 = operand_subword (dest, 0, TRUE, mode);;
-	  rtx dest1 = operand_subword (dest, 1, TRUE, mode);;
+	  rtx dest0 = operand_subword (dest, 0, TRUE, mode);
+	  rtx dest1 = operand_subword (dest, 1, TRUE, mode);
 	  rtx new_mem;
 	  
 	  gcc_assert (GET_CODE (addr) == REG);