public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39274]  New: internal compiler error: in check_cfg, at haifa-sched.c, var-tracking
@ 2009-02-23 16:01 sergei_lus at yahoo dot com
  2009-02-24 22:33 ` [Bug middle-end/39274] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sergei_lus at yahoo dot com @ 2009-02-23 16:01 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-21  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-23 16:01 [Bug c/39274] New: internal compiler error: in check_cfg, at haifa-sched.c, var-tracking sergei_lus at yahoo dot com
2009-02-24 22:33 ` [Bug middle-end/39274] " pinskia at gcc dot gnu dot org
2009-02-25 17:00 ` sergei_lus at yahoo dot com
2010-07-21  9:58 ` steven at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).