From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10693 invoked by alias); 23 Feb 2009 16:01:01 -0000 Received: (qmail 10652 invoked by uid 48); 23 Feb 2009 16:00:48 -0000 Date: Mon, 23 Feb 2009 16:01:00 -0000 Subject: [Bug c/39274] New: internal compiler error: in check_cfg, at haifa-sched.c, var-tracking X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sergei_lus at yahoo dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg02008.txt.bz2 This simple code: typedef void (*TestFunction)(int *); void Add(int *testCase); void test(void); int* TestNew( TestFunction function); static void foo(int* tc){ test(); } int* GetProfileSuite(){ Add(TestNew(foo)); return 0; } ...triggers internal assert on my port of 4.3.2 when compiled with -O2 -g. It will pass with -O2 only or with -O2 -fno-var-tracking -g. The assert triggered is this one: ... static void check_cfg (rtx head, rtx tail) { ... if (control_flow_insn_p (head)) { gcc_assert (BB_END (bb) == head); <<<<<< This one if (any_uncondjump_p (head)) gcc_assert (EDGE_COUNT (bb->succs) == 1 && BARRIER_P (NEXT_INSN (head))); It looks like free_cfg pass removes something it should not after NOTE_INSN_VAR_LOCATION was inserted by variable_tracking pass. -- Summary: internal compiler error: in check_cfg, at haifa-sched.c, var-tracking Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sergei_lus at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39274