From patchwork Tue Jun 22 17:08:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 56536 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 198F2B6EFE for ; Wed, 23 Jun 2010 03:08:33 +1000 (EST) Received: (qmail 2008 invoked by alias); 22 Jun 2010 17:08:30 -0000 Received: (qmail 1989 invoked by uid 22791); 22 Jun 2010 17:08:29 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_TM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Jun 2010 17:08:24 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 3F72C9AC858; Tue, 22 Jun 2010 19:08:22 +0200 (CEST) Date: Tue, 22 Jun 2010 19:08:22 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: One forgotten sanity check in gimple.h Message-ID: <20100622170822.GD15547@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, in gimple.h I missed one sanity check that is rather common. It is because it is done using gcc_unreachable. Fixed by the following patch comitted as obvious. Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 161205) +++ ChangeLog (working copy) @@ -1,5 +1,9 @@ 2010-06-22 Jan Hubicka + * gimple.h (gimple_expr_code): Do checking on when gimple checking is enabled. + +2010-06-22 Jan Hubicka + * df-problems.c (df_rd_confluence_n, df_lr_confluence_n, df_live_confluence_n, df_byte_lr_confluence_n, df_md_confluence_n): Return true if something changed. * df.h (df_confluence_function_n): Return bool. Index: gimple.h =================================================================== --- gimple.h (revision 161189) +++ gimple.h (working copy) @@ -1464,10 +1464,11 @@ gimple_expr_code (const_gimple stmt) enum gimple_code code = gimple_code (stmt); if (code == GIMPLE_ASSIGN || code == GIMPLE_COND) return (enum tree_code) stmt->gsbase.subcode; - else if (code == GIMPLE_CALL) - return CALL_EXPR; else - gcc_unreachable (); + { + gcc_gimple_checking_assert (code == GIMPLE_CALL); + return CALL_EXPR; + } }