re PR tree-optimization/78455 (ICE in operator[], at vec.h:732)

PR tree-optimization/78455
	* tree-ssa-uninit.c (can_chain_union_be_invalidated_p): Fix typo.

	* gcc.dg/uninit-23.c: New.

From-SVN: r242733
This commit is contained in:
Marek Polacek 2016-11-23 03:17:14 +00:00 committed by Marek Polacek
parent c0137dcc60
commit 3135d8fe8a
4 changed files with 38 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-11-22 Marek Polacek <polacek@redhat.com>
PR tree-optimization/78455
* tree-ssa-uninit.c (can_chain_union_be_invalidated_p): Fix typo.
2016-11-22 Ian Lance Taylor <iant@golang.org>
PR go/78431

View File

@ -1,3 +1,8 @@
2016-11-22 Marek Polacek <polacek@redhat.com>
PR tree-optimization/78455
* gcc.dg/uninit-23.c: New.
2016-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78479

View File

@ -0,0 +1,27 @@
/* PR tree-optimization/78455 */
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */
int ij;
void
ql (void)
{
int m5 = 0;
for (;;)
{
if (0)
for (;;)
{
int *go;
int *t4 = go;
l1:
*t4 = (*t4 != 0) ? 0 : 2; /* { dg-warning "may be used uninitialized" } */
}
if (ij != 0)
goto l1;
}
}

View File

@ -2192,7 +2192,7 @@ can_chain_union_be_invalidated_p (pred_chain_union use_preds,
pred_chain c = use_preds[i];
bool entire_pred_chain_invalidated = false;
for (size_t j = 0; j < c.length (); ++j)
if (can_one_predicate_be_invalidated_p (c[i], worklist))
if (can_one_predicate_be_invalidated_p (c[j], worklist))
{
entire_pred_chain_invalidated = true;
break;