OSDN Git Service

* tree.c (walk_tree): Don't walk into default args.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Oct 2000 21:31:25 +0000 (21:31 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Oct 2000 21:31:25 +0000 (21:31 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36985 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.other/inline15.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline15.C b/gcc/testsuite/g++.old-deja/g++.other/inline15.C
new file mode 100644 (file)
index 0000000..b6eede5
--- /dev/null
@@ -0,0 +1,31 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+// Special g++ Options: -O1
+
+class Type;
+template<class E>
+class X
+{
+public:
+  X<E>();
+  inline X<E>(int);
+  inline ~X<E>();
+};
+template<class E> const Type &foo(const X<E> *);
+template<class E> inline X<E>::X(int x)
+{
+  const Type &a = foo(this);
+}
+template<class E> inline X<E>::~X()
+{
+  const Type &a = foo(this);
+}
+class Y
+{
+  X<Type> a;
+public:
+  Y(const X<Type> &x = X<Type>());
+};
+Y::Y(const X<Type> &x) : a(1)
+{
+}