re PR middle-end/55035 (reload1.c:3766:41: error: ‘orig_dup[0]’ may be used uninitialized in this function (for fr30, microblaze, moxie, rl78))
gcc/ PR bootstrap/55035 * reload1.c (elimination_costs_in_insn): Make it obvious to the compiler that the n_dups and n_operands loop bounds are invariant. From-SVN: r226874
This commit is contained in:
parent
c4f855e939
commit
9016329382
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-08-13 Richard Sandiford <richard.sandiford@arm.com>
|
||||
|
||||
PR bootstrap/55035
|
||||
* reload1.c (elimination_costs_in_insn): Make it obvious to the
|
||||
compiler that the n_dups and n_operands loop bounds are invariant.
|
||||
|
||||
2015-08-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* ifcvt.c (noce_try_store_flag_constants): Handle PLUS-immediate
|
||||
|
|
|
@ -3708,10 +3708,12 @@ elimination_costs_in_insn (rtx_insn *insn)
|
|||
/* Eliminate all eliminable registers occurring in operands that
|
||||
can be handled by reload. */
|
||||
extract_insn (insn);
|
||||
for (i = 0; i < recog_data.n_dups; i++)
|
||||
int n_dups = recog_data.n_dups;
|
||||
for (i = 0; i < n_dups; i++)
|
||||
orig_dup[i] = *recog_data.dup_loc[i];
|
||||
|
||||
for (i = 0; i < recog_data.n_operands; i++)
|
||||
int n_operands = recog_data.n_operands;
|
||||
for (i = 0; i < n_operands; i++)
|
||||
{
|
||||
orig_operand[i] = recog_data.operand[i];
|
||||
|
||||
|
@ -3756,7 +3758,7 @@ elimination_costs_in_insn (rtx_insn *insn)
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < recog_data.n_dups; i++)
|
||||
for (i = 0; i < n_dups; i++)
|
||||
*recog_data.dup_loc[i]
|
||||
= *recog_data.operand_loc[(int) recog_data.dup_num[i]];
|
||||
|
||||
|
@ -3764,9 +3766,9 @@ elimination_costs_in_insn (rtx_insn *insn)
|
|||
check_eliminable_occurrences (old_body);
|
||||
|
||||
/* Restore the old body. */
|
||||
for (i = 0; i < recog_data.n_operands; i++)
|
||||
for (i = 0; i < n_operands; i++)
|
||||
*recog_data.operand_loc[i] = orig_operand[i];
|
||||
for (i = 0; i < recog_data.n_dups; i++)
|
||||
for (i = 0; i < n_dups; i++)
|
||||
*recog_data.dup_loc[i] = orig_dup[i];
|
||||
|
||||
/* Update all elimination pairs to reflect the status after the current
|
||||
|
|
Loading…
Add table
Reference in a new issue