re PR tree-optimization/57441 (ICE in gimple-ssa-strength-reduction.c:3447 at -O3)

2013-05-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/57441
	* gimple-ssa-strength-reduction.c (analyze_candidates_and_replace):
	Don't limit size of incr_vec to number of candidates.

2013-05-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/57441
	* gcc.c-torture/compile/pr57441.c: New.

From-SVN: r199414
This commit is contained in:
Bill Schmidt 2013-05-29 16:00:54 +00:00 committed by William Schmidt
parent 0154ea95a1
commit 4b847da9ca
4 changed files with 39 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2013-05-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/57441
* gimple-ssa-strength-reduction.c (analyze_candidates_and_replace):
Don't limit size of incr_vec to number of candidates.
2013-05-29 Steve Ellcey <sellcey@imgtec.com>
* config/mips/mti-linux.h (SYSROOT_SUFFIX_SPEC): Add micromips

View File

@ -3361,7 +3361,6 @@ analyze_candidates_and_replace (void)
less expensive to calculate than the replaced statements. */
else
{
int length;
enum machine_mode mode;
bool speed;
@ -3372,14 +3371,11 @@ analyze_candidates_and_replace (void)
/* If all candidates have already been replaced under other
interpretations, nothing remains to be done. */
length = count_candidates (c);
if (!length)
if (!count_candidates (c))
continue;
if (length > MAX_INCR_VEC_LEN)
length = MAX_INCR_VEC_LEN;
/* Construct an array of increments for this candidate chain. */
incr_vec = XNEWVEC (incr_info, length);
incr_vec = XNEWVEC (incr_info, MAX_INCR_VEC_LEN);
incr_vec_len = 0;
record_increments (c);

View File

@ -1,3 +1,8 @@
2013-05-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/57441
* gcc.c-torture/compile/pr57441.c: New.
2013-05-29 Dehao Chen <dehao@google.com>
PR testsuite/57413

View File

@ -0,0 +1,26 @@
/* PR tree-optimization/57441 */
int a, c, d, *e;
unsigned char b;
char
baz (char p1)
{
return p1 * a;
}
void func_65 ();
func_1 ()
{
func_65 ();
func_65 ();
}
void
func_65 ()
{
d = baz (b--);
if (*e)
b--;
c = 0;
}