diff mbox

RFA (m32r): Fix PR46427

Message ID 20101111061830.twr45eurqc4804sk-nzlynne@webmail.spamcop.net
State New
Headers show

Commit Message

Joern Rennecke Nov. 11, 2010, 11:18 a.m. UTC
built on i686-pc-linux-gnu with gcc (GCC) 4.6.0 20101103 (experimental) .
2010-11-10  Joern Rennecke  <amylaar@spamcop.net>

	* config/m32r/m32r.c: Remove unused variable frame_size.
	Use variable insn.

Comments

Nick Clifton Nov. 15, 2010, 9:43 a.m. UTC | #1
Hi Joern,

The first part of the patch is OK, but...

@@ -2009,6 +2009,9 @@ m32r_legitimize_pic_address (rtx orig, r
        /* Put a REG_EQUAL note on this insn, so that it can be optimized
           by loop.  */
        set_unique_reg_note (insn, REG_EQUAL, orig);
+#else
+      /* Silence set-but-not used warning.  */
+      gcc_assert (insn);
  #endif
        return reg;
      }

There is no need for this.  Just delete the #if 0 ... #endif block and 
remove the insn local variable.

Approved with that change.

Cheers
   Nick
diff mbox

Patch

Index: config/m32r/m32r.c
===================================================================
--- config/m32r/m32r.c	(revision 166544)
+++ config/m32r/m32r.c	(working copy)
@@ -1584,7 +1584,7 @@  m32r_compute_frame_size (int size)	/* # 
 {
   unsigned int regno;
   unsigned int total_size, var_size, args_size, pretend_size, extra_size;
-  unsigned int reg_size, frame_size;
+  unsigned int reg_size;
   unsigned int gmask;
   enum m32r_function_type fn_type;
   int interrupt_p;
@@ -1626,7 +1626,7 @@  m32r_compute_frame_size (int size)	/* # 
      handler will do the right thing if this changes total_size.  */
   total_size = M32R_STACK_ALIGN (total_size);
 
-  frame_size = total_size - (pretend_size + reg_size);
+  /* frame_size = total_size - (pretend_size + reg_size); */
 
   /* Save computed information.  */
   current_frame_info.total_size   = total_size;
@@ -2009,6 +2009,9 @@  m32r_legitimize_pic_address (rtx orig, r
       /* Put a REG_EQUAL note on this insn, so that it can be optimized
          by loop.  */
       set_unique_reg_note (insn, REG_EQUAL, orig);
+#else
+      /* Silence set-but-not used warning.  */
+      gcc_assert (insn);
 #endif
       return reg;
     }