Commit 19656178 by Martin Jambor Committed by Martin Jambor

re PR tree-optimization/42704 (ICE in verify_ssa after early SRA)

2010-01-13  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/42704
	* tree-sra.c (sra_modify_assign): Do not delete assignments to
	SSA_NAMEs.

	* testsuite/g++.dg/torture/pr42704.C: New test.

From-SVN: r155865
parent 2a2ace66
2010-01-13 Martin Jambor <mjambor@suse.cz> 2010-01-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42704
* tree-sra.c (sra_modify_assign): Do not delete assignments to
SSA_NAMEs.
2010-01-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42703 PR tree-optimization/42703
* tree-sra.c (analyze_access_subtree): Check that we can build a * tree-sra.c (analyze_access_subtree): Check that we can build a
reference to the original data within the aggregate. reference to the original data within the aggregate.
......
2010-01-13 Martin Jambor <mjambor@suse.cz> 2010-01-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42704
* g++.dg/torture/pr42704.C: New test.
2010-01-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42703 PR tree-optimization/42703
* testsuite/gcc.c-torture/compile/pr42703.c: New test. * gcc.c-torture/compile/pr42703.c: New test.
2010-01-13 Richard Guenther <rguenther@suse.de> 2010-01-13 Richard Guenther <rguenther@suse.de>
......
/* { dg-do compile } */
typedef int PRInt32;
class nsTreeRows {
class Subtree { };
enum { kMaxDepth = 32 };
struct Link {
Subtree* mParent;
PRInt32 mChildIndex;
Link& operator=(const Link& aLink) {
mParent = aLink.mParent;
mChildIndex = aLink.mChildIndex;
}
};
class iterator {
PRInt32 mTop;
PRInt32 mRowIndex;
Link mLink[kMaxDepth];
public:
iterator() : mTop(-1), mRowIndex(-1) { }
iterator& operator=(const iterator& aIterator);
};
Subtree* EnsureSubtreeFor(Subtree* aParent, PRInt32 aChildIndex);
Subtree* GetSubtreeFor(const Subtree* aParent,
PRInt32 aChildIndex, PRInt32* aSubtreeSize = 0);
void InvalidateCachedRow() {
mLastRow = iterator();
}
iterator mLastRow;
};
nsTreeRows::Subtree* nsTreeRows::EnsureSubtreeFor(Subtree* aParent,
PRInt32 aChildIndex) {
Subtree* subtree = GetSubtreeFor(aParent, aChildIndex);
if (! subtree) {
InvalidateCachedRow();
}
}
nsTreeRows::iterator& nsTreeRows::iterator::operator=(const iterator&
aIterator) {
mTop = aIterator.mTop;
for (PRInt32 i = mTop;
i >= 0;
--i) mLink[i] = aIterator.mLink[i];
}
...@@ -2533,7 +2533,9 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi, ...@@ -2533,7 +2533,9 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi,
{ {
if (access_has_children_p (racc)) if (access_has_children_p (racc))
{ {
if (!racc->grp_unscalarized_data) if (!racc->grp_unscalarized_data
/* Do not remove SSA name definitions (PR 42704). */
&& TREE_CODE (lhs) != SSA_NAME)
{ {
generate_subtree_copies (racc->first_child, lhs, generate_subtree_copies (racc->first_child, lhs,
racc->offset, 0, 0, gsi, racc->offset, 0, 0, gsi,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment