public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rmerkert at alphatech dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/13239] [3.3 REGRESSION] Assertion does not seem to work correctly anymore Date: Tue, 02 Dec 2003 22:32:00 -0000 [thread overview] Message-ID: <20031202223227.17226.qmail@sources.redhat.com> (raw) In-Reply-To: <20031130163447.13239.rmerkert@alphatech.com> ------- Additional Comments From rmerkert at alphatech dot com 2003-12-02 22:32 ------- Here's another, slightly simplified, example: #include <assert.h> struct Y { Y () : _y(0) {} //Y (const Y& y) : _y(y._y) {} int _y; }; bool foo() { return true; } Y bar() { return Y(); } int main() { assert (bar()._y==0); assert ( foo() && (bar()._y)==0 ); return 0; } If the copy constructor is uncommented, then it works. It almost looks as if it does not generate the temporary Y object and just pretends it has got it. I've tried this on a solaris and it worked and I also tried it on a cygwin (3.1 ? maybe) which worked as well. Can someone verify that their system is using builtin_expect rather than general assert? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13239
next prev parent reply other threads:[~2003-12-02 22:32 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-11-30 16:34 [Bug c++/13239] New: " rmerkert at alphatech dot com 2003-11-30 17:16 ` [Bug c++/13239] " rmerkert at alphatech dot com 2003-12-01 15:54 ` bangerth at dealii dot org 2003-12-02 3:13 ` rmerkert at alphatech dot com 2003-12-02 3:16 ` rmerkert at alphatech dot com 2003-12-02 22:32 ` rmerkert at alphatech dot com [this message] 2003-12-02 23:00 ` bangerth at dealii dot org 2003-12-02 23:38 ` [Bug c++/13239] [3.4 regression] " bangerth at dealii dot org 2003-12-02 23:40 ` rmerkert at alphatech dot com 2003-12-03 0:04 ` [Bug c++/13239] [3.3/3.4 " bangerth at dealii dot org 2003-12-05 23:09 ` pinskia at gcc dot gnu dot org 2003-12-06 20:59 ` bangerth at dealii dot org 2003-12-10 17:40 ` janis187 at us dot ibm dot com 2003-12-19 14:04 ` cvs-commit at gcc dot gnu dot org 2003-12-19 14:17 ` cvs-commit at gcc dot gnu dot org 2003-12-21 22:45 ` pinskia at gcc dot gnu dot org 2004-01-27 15:29 ` cvs-commit at gcc dot gnu dot org
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=20031202223227.17226.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).