diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/inline1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/inline1.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline1.C b/gcc/testsuite/g++.old-deja/g++.other/inline1.C new file mode 100644 index 000000000..d862f00fb --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/inline1.C @@ -0,0 +1,20 @@ +// { dg-do assemble } +// { dg-options "-O2 -Winline" } +// Origin: Martin Reinecke <martin@MPA-Garching.MPG.DE> + +class foo +{ + public: + float x; + + foo (float xval) + : x (xval) {} + + foo operator+ (const foo &foo2) const + { return foo (x+foo2.x); } +}; + +int main() +{ + foo f=foo(1)+foo(2); +} |