mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/42730 (ice: verify_stmts failed)
2010-01-13 Richard Guenther <rguenther@suse.de> PR tree-optimization/42730 * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Add shortcut for offset zero. * gcc.c-torture/compile/pr42730.c: New testcase. From-SVN: r155872
This commit is contained in:
parent
30c73d1a36
commit
5db959b648
|
@ -1,3 +1,9 @@
|
||||||
|
2010-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/42730
|
||||||
|
* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Add shortcut for
|
||||||
|
offset zero.
|
||||||
|
|
||||||
2010-01-13 Steve Ellcey <sje@cup.hp.com>
|
2010-01-13 Steve Ellcey <sje@cup.hp.com>
|
||||||
|
|
||||||
PR target/pr42542
|
PR target/pr42542
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/42730
|
||||||
|
* gcc.c-torture/compile/pr42730.c: New testcase.
|
||||||
|
|
||||||
2010-01-13 Steve Ellcey <sje@cup.hp.com>
|
2010-01-13 Steve Ellcey <sje@cup.hp.com>
|
||||||
|
|
||||||
PR target/pr42542
|
PR target/pr42542
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
union bzz
|
||||||
|
{
|
||||||
|
unsigned *pa;
|
||||||
|
void *pv;
|
||||||
|
};
|
||||||
|
|
||||||
|
void foo (void)
|
||||||
|
{
|
||||||
|
union bzz u;
|
||||||
|
void **x;
|
||||||
|
void *y = 0;
|
||||||
|
x = &u.pv;
|
||||||
|
*x = y;
|
||||||
|
}
|
|
@ -2120,6 +2120,10 @@ maybe_fold_stmt_indirect (tree expr, tree base, tree offset)
|
||||||
&& is_gimple_min_invariant (DECL_INITIAL (base)))
|
&& is_gimple_min_invariant (DECL_INITIAL (base)))
|
||||||
return DECL_INITIAL (base);
|
return DECL_INITIAL (base);
|
||||||
|
|
||||||
|
/* If there is no offset involved simply return the folded base. */
|
||||||
|
if (integer_zerop (offset))
|
||||||
|
return base;
|
||||||
|
|
||||||
/* Try folding *(&B+O) to B.X. */
|
/* Try folding *(&B+O) to B.X. */
|
||||||
t = maybe_fold_offset_to_reference (loc, base_addr, offset,
|
t = maybe_fold_offset_to_reference (loc, base_addr, offset,
|
||||||
TREE_TYPE (expr));
|
TREE_TYPE (expr));
|
||||||
|
|
Loading…
Reference in New Issue