re PR tree-optimization/42773 (ICE with g++ from 4.4.3 20100112 (prerelease))
2010-01-17 Richard Guenther <rguenther@suse.de> PR tree-optimization/42773 * tree-ssa-pre.c (phi_translate_set): Fix check for PHI node existence. (compute_antic_aux): Likewise. (compute_partial_antic_aux): Likewise. * g++.dg/torture/pr42773.C: New testcase. From-SVN: r155982
This commit is contained in:
parent
d2143a2f9d
commit
9adf0570ff
4 changed files with 70 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2010-01-17 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/42773
|
||||||
|
* tree-ssa-pre.c (phi_translate_set): Fix check for PHI node existence.
|
||||||
|
(compute_antic_aux): Likewise.
|
||||||
|
(compute_partial_antic_aux): Likewise.
|
||||||
|
|
||||||
2010-01-17 Jie Zhang <jie.zhang@analog.com>
|
2010-01-17 Jie Zhang <jie.zhang@analog.com>
|
||||||
|
|
||||||
PR debug/42767
|
PR debug/42767
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-17 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/42773
|
||||||
|
* g++.dg/torture/pr42773.C: New testcase.
|
||||||
|
|
||||||
2010-01-17 Janus Weil <janus@gcc.gnu.org>
|
2010-01-17 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/42677
|
PR fortran/42677
|
||||||
|
|
54
gcc/testsuite/g++.dg/torture/pr42773.C
Normal file
54
gcc/testsuite/g++.dg/torture/pr42773.C
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-fno-exceptions" }
|
||||||
|
|
||||||
|
typedef unsigned int uint;
|
||||||
|
struct QShared {
|
||||||
|
bool deref() {
|
||||||
|
return !--count;
|
||||||
|
}
|
||||||
|
uint count;
|
||||||
|
};
|
||||||
|
template <class T> class QValueListNode {
|
||||||
|
public:
|
||||||
|
QValueListNode<T>* next;
|
||||||
|
QValueListNode<T>* prev;
|
||||||
|
};
|
||||||
|
template <class T> class QValueListPrivate : public QShared {
|
||||||
|
public:
|
||||||
|
typedef QValueListNode<T> Node;
|
||||||
|
typedef QValueListNode<T>* NodePtr;
|
||||||
|
QValueListPrivate();
|
||||||
|
void derefAndDelete() {
|
||||||
|
if ( deref() ) delete this;
|
||||||
|
}
|
||||||
|
~QValueListPrivate();
|
||||||
|
NodePtr node;
|
||||||
|
};
|
||||||
|
template <class T> QValueListPrivate<T>::QValueListPrivate() {
|
||||||
|
node = new Node;
|
||||||
|
node->next = node->prev = node;
|
||||||
|
}
|
||||||
|
template <class T> QValueListPrivate<T>::~QValueListPrivate() {
|
||||||
|
NodePtr p = node->next;
|
||||||
|
while( p != node ) {
|
||||||
|
NodePtr x = p->next;
|
||||||
|
delete p;
|
||||||
|
p = x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
template <class T> class QValueList {
|
||||||
|
public:
|
||||||
|
QValueList() {
|
||||||
|
sh = new QValueListPrivate<T>;
|
||||||
|
}
|
||||||
|
~QValueList() {
|
||||||
|
sh->derefAndDelete();
|
||||||
|
}
|
||||||
|
QValueListPrivate<T>* sh;
|
||||||
|
};
|
||||||
|
class Cell {
|
||||||
|
QValueList<Cell*> obscuringCells() const;
|
||||||
|
};
|
||||||
|
QValueList<Cell*> Cell::obscuringCells() const {
|
||||||
|
QValueList<Cell*> empty;
|
||||||
|
}
|
|
@ -1823,7 +1823,7 @@ phi_translate_set (bitmap_set_t dest, bitmap_set_t set, basic_block pred,
|
||||||
pre_expr expr;
|
pre_expr expr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!phi_nodes (phiblock))
|
if (gimple_seq_empty_p (phi_nodes (phiblock)))
|
||||||
{
|
{
|
||||||
bitmap_set_copy (dest, set);
|
bitmap_set_copy (dest, set);
|
||||||
return;
|
return;
|
||||||
|
@ -2269,14 +2269,14 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
|
||||||
goto maybe_dump_sets;
|
goto maybe_dump_sets;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phi_nodes (first))
|
if (!gimple_seq_empty_p (phi_nodes (first)))
|
||||||
phi_translate_set (ANTIC_OUT, ANTIC_IN (first), block, first);
|
phi_translate_set (ANTIC_OUT, ANTIC_IN (first), block, first);
|
||||||
else
|
else
|
||||||
bitmap_set_copy (ANTIC_OUT, ANTIC_IN (first));
|
bitmap_set_copy (ANTIC_OUT, ANTIC_IN (first));
|
||||||
|
|
||||||
for (i = 0; VEC_iterate (basic_block, worklist, i, bprime); i++)
|
for (i = 0; VEC_iterate (basic_block, worklist, i, bprime); i++)
|
||||||
{
|
{
|
||||||
if (phi_nodes (bprime))
|
if (!gimple_seq_empty_p (phi_nodes (bprime)))
|
||||||
{
|
{
|
||||||
bitmap_set_t tmp = bitmap_set_new ();
|
bitmap_set_t tmp = bitmap_set_new ();
|
||||||
phi_translate_set (tmp, ANTIC_IN (bprime), block, bprime);
|
phi_translate_set (tmp, ANTIC_IN (bprime), block, bprime);
|
||||||
|
@ -2426,7 +2426,7 @@ compute_partial_antic_aux (basic_block block,
|
||||||
FOR_EACH_EXPR_ID_IN_SET (ANTIC_IN (bprime), i, bi)
|
FOR_EACH_EXPR_ID_IN_SET (ANTIC_IN (bprime), i, bi)
|
||||||
bitmap_value_insert_into_set (PA_OUT,
|
bitmap_value_insert_into_set (PA_OUT,
|
||||||
expression_for_id (i));
|
expression_for_id (i));
|
||||||
if (phi_nodes (bprime))
|
if (!gimple_seq_empty_p (phi_nodes (bprime)))
|
||||||
{
|
{
|
||||||
bitmap_set_t pa_in = bitmap_set_new ();
|
bitmap_set_t pa_in = bitmap_set_new ();
|
||||||
phi_translate_set (pa_in, PA_IN (bprime), block, bprime);
|
phi_translate_set (pa_in, PA_IN (bprime), block, bprime);
|
||||||
|
|
Loading…
Add table
Reference in a new issue