* tree.c (stabilize_call, stabilize_init): Do nothing if
processing_template_decl.
* g++.dg/template/new8.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130645
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/34336
+ * tree.c (stabilize_call, stabilize_init): Do nothing if
+ processing_template_decl.
+
2007-12-05 Jakub Jelinek <jakub@redhat.com>
PR c++/34271
int i;
int nargs = call_expr_nargs (call);
- if (call == error_mark_node)
- return;
+ if (call == error_mark_node || processing_template_decl)
+ {
+ *initp = NULL_TREE;
+ return;
+ }
gcc_assert (TREE_CODE (call) == CALL_EXPR);
*initp = NULL_TREE;
- if (t == error_mark_node)
+ if (t == error_mark_node || processing_template_decl)
return true;
if (TREE_CODE (t) == INIT_EXPR
+2007-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/34336
+ * g++.dg/template/new8.C: New test.
+
2007-12-06 Tobias Burnus <burnus@net-b.de>
PR fortran/34333
--- /dev/null
+// PR c++/34336
+// { dg-do compile }
+
+struct A;
+
+template <class T>
+struct S
+{
+ T *m;
+ T &operator* () { return *m; }
+};
+
+struct B
+{
+ B (const A &);
+};
+
+template <class T>
+struct C
+{
+ C ();
+ S<A> c;
+};
+
+template <class T>
+C<T>::C ()
+{
+ B *b = new B (*c);
+}