From: Jason Merrill Date: Fri, 20 Oct 2000 21:31:25 +0000 (-0400) Subject: * tree.c (walk_tree): Don't walk into default args. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05c1707ca2e257dd071ed73e802862b72d1ce018;p=gcc.git * tree.c (walk_tree): Don't walk into default args. From-SVN: r36985 --- 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) +{ +}