summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.old-deja/g++.other/inline11.C
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-12 19:26:43 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-12 19:26:43 +0000
commit31a4781550225681f63a08b50cdfc6ada25e6027 (patch)
tree07c03bc9dba5293c1ca256f94206facbe898ae02 /gcc/testsuite/g++.old-deja/g++.other/inline11.C
parente79b3b6bd189e156a245ae85feca135797d82d26 (diff)
downloadppe42-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.C33
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;
+}
OpenPOWER on IntegriCloud