Commit b1d82db0 by Dodji Seketeli Committed by Dodji Seketeli

re PR c++/40866 (ICE in create_tmp_var, at gimplify.c:504)

2009-08-10  Dodji Seketeli  <dodji@redhat.com>

gcc/ChangeLog:
	PR c++/40866
	* tree-inline.c (copy_statement_list): The resulting copy shouldn't
	loose the original type of the statement list.

gcc/testsuite/ChangeLog:
	PR c++/40866
	* g++.dg/expr/stmt-expr-1.C: New test.

From-SVN: r150615
parent 5e3fef6c
2009-08-10 Dodji Seketeli <dodji@redhat.com>
PR c++/40866
* tree-inline.c (copy_statement_list): The resulting copy shouldn't
loose the original type of the statement list.
2009-08-09 Douglas B Rupp <rupp@gnat.com>
* config/alpha/alpha.c: Include libfuncs.h
......
2009-08-10 Dodji Seketeli <dodji@redhat.com>
PR c++/40866
* g++.dg/expr/stmt-expr-1.C: New test.
2009-08-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/41016
......
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/40866
// { dg-options "-std=gnu++98" }
// { dg-do "compile" }
template <typename T> class QForeachContainer {
public:
QForeachContainer();
int brk;
typename T::const_iterator i;
};
template <typename T> class QList {
public:
class const_iterator {
public:
const_iterator(const const_iterator &o);
const_iterator &operator++();
};
};
class QAction;
class QWidget {
public:
QList<QAction*> actions() const;
};
class myDialog : public QWidget {
myDialog();
};
myDialog::myDialog()
{
QForeachContainer<__typeof__(actions())> _container_;
({++_container_.brk; ++_container_.i;});
}
......@@ -600,6 +600,7 @@ copy_statement_list (tree *tp)
new_tree = alloc_stmt_list ();
ni = tsi_start (new_tree);
oi = tsi_start (*tp);
TREE_TYPE (new_tree) = TREE_TYPE (*tp);
*tp = new_tree;
for (; !tsi_end_p (oi); tsi_next (&oi))
......
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