diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-12 19:26:43 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-12 19:26:43 +0000 |
commit | 31a4781550225681f63a08b50cdfc6ada25e6027 (patch) | |
tree | 07c03bc9dba5293c1ca256f94206facbe898ae02 /gcc/testsuite/g++.old-deja/g++.other/inline11.C | |
parent | e79b3b6bd189e156a245ae85feca135797d82d26 (diff) | |
download | ppe42-gcc-31a4781550225681f63a08b50cdfc6ada25e6027.tar.gz ppe42-gcc-31a4781550225681f63a08b50cdfc6ada25e6027.zip |
* optimize.c (expand_call_inline): Don't recurse into the code
used to initialize the parameters more than once.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34501 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/inline11.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/inline11.C | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline11.C b/gcc/testsuite/g++.old-deja/g++.other/inline11.C new file mode 100644 index 00000000000..9556fc3b172 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/inline11.C @@ -0,0 +1,33 @@ +// Origin: Jakub Jelinek <jakub@redhat.com> +// Special g++ Options: -O2 + +class baz +{ +public: + baz& operator += (const baz&); +}; + +inline baz& baz::operator += (const baz& r) +{ + return *this; +} + +inline baz operator + (int x, const baz& y) +{ + return y; +} + +static inline baz bar (int alpha); +static inline baz foo (int alpha) +{ + baz tmp = alpha + foo (alpha); + tmp += alpha + bar (alpha); + return tmp; +} + +static inline baz bar (int alpha) +{ + baz tmp = alpha + bar (alpha); + tmp += alpha + foo (alpha); + return tmp; +} |