From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12263 invoked by alias); 5 Jan 2003 18:41:02 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12256 invoked from network); 5 Jan 2003 18:41:02 -0000 Received: from unknown (HELO egil.codesourcery.com) (66.92.14.122) by 209.249.29.67 with SMTP; 5 Jan 2003 18:41:02 -0000 Received: from zack by egil.codesourcery.com with local (Exim 3.36 #1 (Debian)) id 18VFhY-0005Eh-00; Sun, 05 Jan 2003 10:40:48 -0800 To: martin@xemacs.org Cc: gcc@gcc.gnu.org Subject: Re: More embarrassing failures to optimize From: Zack Weinberg Date: Sun, 05 Jan 2003 18:51:00 -0000 In-Reply-To: <15895.61324.872456.502039@wobble.local> (Martin Buchholz's message of "Sun, 5 Jan 2003 00:40:44 -0800") Message-ID: <87of6vh233.fsf@egil.codesourcery.com> User-Agent: Gnus/5.090011 (Oort Gnus v0.11) Emacs/21.2 (i386-pc-linux-gnu) References: <15895.61324.872456.502039@wobble.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00227.txt.bz2 Martin Buchholz writes: > void f3 () > { > Bool t (true), f (false); > > assert (t); assert (! f); > assert (t); assert (! f); > } > > is "optimized" to > > xorl %edx, %edx > subl $12, %esp > testb %dl, %dl > jne .L52 > addl $12, %esp > ret > .L52: > pushl $_ZZ2f3vE19__PRETTY_FUNCTION__ > pushl $42 > pushl $.LC0 > pushl $.LC2 > call __assert_fail > > Note that the resulting code contains exactly one branch, not two or > four. I suspect this is the same underlying problem that causes gcc.c-torture/execute/builtin-constant.c to fail. This was discussed at some length in the thread starting at http://gcc.gnu.org/ml/gcc-patches/2002-11/msg00235.html - it's nontrivial to fix. You might want to try these embarrassing failures against the tree-ssa branch. zw