From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15559 invoked by alias); 15 Apr 2008 19:26:33 -0000 Received: (qmail 15550 invoked by uid 22791); 15 Apr 2008 19:26:32 -0000 X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 15 Apr 2008 19:26:04 +0000 Received: from gentoo.org (cp237988-a.mill1.nb.home.nl [84.29.252.211]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id E874766E62 for ; Tue, 15 Apr 2008 19:26:02 +0000 (UTC) Date: Wed, 16 Apr 2008 02:24:00 -0000 From: Harald van =?utf-8?Q?D=C4=B3k?= To: gcc-help@gcc.gnu.org Subject: Re: error: BB 13 can not throw but has EH edges Message-ID: <20080415192702.GA15170@boostbox.mill1.nb.home.nl> References: <20080414195733.GA28650@boostbox.mill1.nb.home.nl> <48042D72.1A175F79@dessent.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48042D72.1A175F79@dessent.net> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-04/txt/msg00212.txt.bz2 On Mon, Apr 14, 2008 at 09:21:47PM -0700, Brian Dessent wrote: > Harald van D?k wrote: > > > - Is this a known issue? I've searched for this error, but only got > > results requiring specific compiler options that aren't necessary to get > > it to fail here. I will report it as a bug if it's not known (and not > > already fixed by accident). > > This looks like . > > > - When I disable checking, GCC does not generate any error message. Can > > I expect that the code it generates will be correct, or might it be > > broken and going undetected? > > Disabling checking just papers over the real problem, which is an > internal inconsistency in gcc. Whether or not the generated code is > correct is unknown. Yes, and that was what I was curious about: I was wondering whether the optimiser is incorrect, or only the checks. If it turns out the checks are incorrect, there's no reason for me to doubt the rest, but I'm not at all familiar enough with GCC's structure to see what's going on. > > - What would you recommend as a workaround (other than disabling > > checking)? My first guess would be to remove __attribute__((__const__)), but > > that's not an option, as it's part of gtk, and not of the program > > itself. Do you have a good alternative? > > I'd add your testcase to that PR above, at least. You could also try > the current trunk and see if it's fixed there. Thanks, I've tried the most recent snapshots of 4.3 and 4.4, but they both fail the same way. I've attached a testcase that's a bit shorter to the bug.