public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@physics.uc.edu> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/8952: failure to optimize away trivial C++ object creation Date: Sun, 15 Dec 2002 12:36:00 -0000 [thread overview] Message-ID: <20021215203601.10582.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/8952; it has been noted by GNATS. From: Andrew Pinski <pinskia@physics.uc.edu> To: martin@xemacs.org Cc: Andrew Pinski <pinskia@physics.uc.edu>, gcc-gnats@gcc.gnu.org Subject: Re: optimization/8952: failure to optimize away trivial C++ object creation Date: Sun, 15 Dec 2002 12:31:18 -0800 The following also does not optimize away on ppc-apple-darwin6.2 also so it does not seems to be target specific. Thanks, Andrew Pinski >> How-To-Repeat: > Compile the following on x86 Linux using: g++ -S -O3 > examine the .s file generated. > > class Complex > { > private: > const int real_; > const int imag_; > > public: > inline Complex (int real, int imag) : real_ (real), imag_ (imag) {} > inline int Real() const { return real_; } > inline int Imag() const { return imag_; } > > inline friend Complex operator+ (Complex z1, Complex z2) > { return Complex (z1.real_ + z2.real_, z1.imag_ + z2.imag_); } > }; > > Complex foo () { return Complex(9,11); } > Complex bar () { return Complex(1,2) + Complex(8,9); } >> Fix: > >> Release-Note: >> Audit-Trail: >> Unformatted: > >
next reply other threads:[~2002-12-15 20:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-15 12:36 Andrew Pinski [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-12-20 20:44 bangerth 2002-12-15 12:26 martin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021215203601.10582.qmail@sources.redhat.com \ --to=pinskia@physics.uc.edu \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).