aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-10-20 17:31:25 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-10-20 17:31:25 -0400
commit05c1707ca2e257dd071ed73e802862b72d1ce018 (patch)
tree747c48635245160fcac4de2ee6aa9a14029d2200
parentba523395f170c2a6ebdf373b8bf0a9d82664a36b (diff)
downloadgcc-05c1707ca2e257dd071ed73e802862b72d1ce018.zip
gcc-05c1707ca2e257dd071ed73e802862b72d1ce018.tar.gz
gcc-05c1707ca2e257dd071ed73e802862b72d1ce018.tar.bz2
* tree.c (walk_tree): Don't walk into default args.
From-SVN: r36985
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/inline15.C31
1 files changed, 31 insertions, 0 deletions
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
index 0000000..b6eede5
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline15.C
@@ -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)
+{
+}