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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150615
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
--- /dev/null
+// 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;});
+}
+
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))