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]
Other format: [Raw text]

Re: Fix reload1.c warning for some targets


On 08/05/2015 08:18 AM, Richard Sandiford wrote:
Building some targets results in a warning about orig_dup[i] potentially
being used uninitialised.  I think the warning is fair, since it isn't
obvious that the reog_data-based loop bound remains unchanged between:

   for (i = 0; i < recog_data.n_dups; i++)
     orig_dup[i] = *recog_data.dup_loc[i];

and:

   for (i = 0; i < recog_data.n_dups; i++)
     *recog_data.dup_loc[i] = orig_dup[i];

Tested on x86_64-linux-gnu.  OK to install?

Thanks,
Richard

gcc/
	* reload1.c (elimination_costs_in_insn): Make it obvious to the
	compiler that the n_dups and n_operands loop bounds are invariant.
So thinking more about this, I think the best way forward is to:

  1. Create a new BZ with the false positive extracted from c#4.

  2. Install your patch and close 55035.

I'll take care of #1, you can handle #2.


jeff


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