diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-22 20:42:58 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-22 20:42:58 +0000 |
commit | 569887b41c56f806a7c8316208f01b66120d45cc (patch) | |
tree | 48b8e3eb18a4828c52af140ab395186f2b5d21b9 /gcc/testsuite/g++.dg/template/recurse1.C | |
parent | 9b7c4a900c4073cdbdcd4e4d2c3ae1e16bab463d (diff) | |
download | gcc-569887b41c56f806a7c8316208f01b66120d45cc.tar.gz |
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/5050
* tree.c (cp_start_inlining): Remove.
(cp_end_inlining): Remove.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
(LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
* cp-tree.h (cp_start_inlining): Do not declare.
(cp_end_inlining): Do not declare.
PR c++/5050
* g++.dg/template/recurse1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/template/recurse1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/recurse1.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/recurse1.C b/gcc/testsuite/g++.dg/template/recurse1.C new file mode 100644 index 00000000000..4789983affe --- /dev/null +++ b/gcc/testsuite/g++.dg/template/recurse1.C @@ -0,0 +1,16 @@ +// PR c++/5050 +// Origin: georg.wild@gmx.de +// Reduced by: tbagot@bluearc.com and Nathanael C. Nerode <neroden@twcny.rr.com> +// Test for that excessive template recursion does not occur +// because of optimization. +// { dg-options "-ftemplate-depth-1 -O" } + + struct ostream { + template<class T> ostream& foo( const T & ) + { return *this; } + }; + + void foo() { + ostream os; + (os.foo(1)).foo(2); + } |