From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17242 invoked by alias); 2 Dec 2003 22:32:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17228 invoked by uid 48); 2 Dec 2003 22:32:27 -0000 Date: Tue, 02 Dec 2003 22:32:00 -0000 Message-ID: <20031202223227.17226.qmail@sources.redhat.com> From: "rmerkert at alphatech dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031130163447.13239.rmerkert@alphatech.com> References: <20031130163447.13239.rmerkert@alphatech.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13239] [3.3 REGRESSION] Assertion does not seem to work correctly anymore X-Bugzilla-Reason: CC X-SW-Source: 2003-12/txt/msg00319.txt.bz2 List-Id: ------- Additional Comments From rmerkert at alphatech dot com 2003-12-02 22:32 ------- Here's another, slightly simplified, example: #include 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