From patchwork Tue Jun 22 17:08:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: One forgotten sanity check in gimple.h X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 56536 Message-Id: <20100622170822.GD15547@kam.mff.cuni.cz> To: gcc-patches@gcc.gnu.org Date: Tue, 22 Jun 2010 19:08:22 +0200 From: Jan Hubicka List-Id: 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; + } }