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