This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Possible typo in cse.c cse_insn()


Hi

The following code extract from the procedure cse_insn() in 
cse.c would appear to have a typo.

      /* Now deal with the destination.  */
      do_not_record = 0;
      sets[i].inner_dest_loc = &SET_DEST (sets[0].rtl);

      /* Look within any SIGN_EXTRACT or ZERO_EXTRACT
	 to the MEM or REG within it.  */
      while (GET_CODE (dest) == SIGN_EXTRACT
	     || GET_CODE (dest) == ZERO_EXTRACT
	     || GET_CODE (dest) == SUBREG
	     || GET_CODE (dest) == STRICT_LOW_PART)
	{
	  sets[i].inner_dest_loc = &XEXP (dest, 0);
	  dest = XEXP (dest, 0);
	}

      sets[i].inner_dest = dest;

1. I suspect the &SET_DEST (sets[0].rtl) should be &SET_DEST
(sets[i].rtl)

2. The inner_dest_loc field is ONLY assigned in the above code extract
its
never referenced elsewhere. This either points to missing code or dead
wood which can be removed.

Graham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]