From 05c1707ca2e257dd071ed73e802862b72d1ce018 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 20 Oct 2000 17:31:25 -0400 Subject: [PATCH] * tree.c (walk_tree): Don't walk into default args. From-SVN: r36985 --- .../g++.old-deja/g++.other/inline15.C | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/inline15.C 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 00000000000..b6eede541ca --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/inline15.C @@ -0,0 +1,31 @@ +// Build don't link: +// Origin: Jakub Jelinek +// Special g++ Options: -O1 + +class Type; +template +class X +{ +public: + X(); + inline X(int); + inline ~X(); +}; +template const Type &foo(const X *); +template inline X::X(int x) +{ + const Type &a = foo(this); +} +template inline X::~X() +{ + const Type &a = foo(this); +} +class Y +{ + X a; +public: + Y(const X &x = X()); +}; +Y::Y(const X &x) : a(1) +{ +} -- 2.30.2