From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22392 invoked by alias); 12 Dec 2005 03:01:47 -0000 Received: (qmail 22379 invoked by uid 48); 12 Dec 2005 03:01:43 -0000 Date: Mon, 12 Dec 2005 03:01:00 -0000 Message-ID: <20051212030143.22378.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/25314] [3.4/4.0/4.1/4.2 Regression] Unreachable code at beginning of switch statement is not reported anymore In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" 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 X-SW-Source: 2005-12/txt/msg01119.txt.bz2 List-Id: ------- Comment #5 from pinskia at gcc dot gnu dot org 2005-12-12 03:01 ------- : Search converges between 2003-04-16-trunk (#231) and 2003-04-17-trunk (#232). >>From that I almost think it was orginally caused by (but I should note that the 4.0 regression would have been caused by the change over to tree-ssa): 2003-04-16 Roger Sayle * c-semantics.c (find_reachable_label): New function to find a potentially reachable label in an expression. (expand_unreachable_if_stmt): Similar to expand_if_stmt but assumes the start of the IF_STMT is unreachable (dead) code. (expand_unreachable_stmt): Similar to expand_stmt but assumes the start of the statement list is unreachable (dead) code. (genrtl_if_stmt): If the controlling expression of the IF is constant, use expand_unreachable_stmt for the THEN or ELSE clause as appropriate. (genrtl_switch_stmt): Use expand_unreachable_stmt to expand the body of a SWITCH statement. (expand_stmt): The code immediately following a "return", "break", "continue" or "goto" is unreachable. * Makefile.in (c-semantics.o): Depend upon tree-inline.h. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at eyesopen dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25314