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
* [Bug middle-end/39274] internal compiler error: in check_cfg, at haifa-sched.c, var-tracking
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 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-24 22:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-02-24 22:33 -------
>It looks like free_cfg pass removes something it should not after
> NOTE_INSN_VAR_LOCATION was inserted by variable_tracking pass.
Are you running the scheduler manually in your machine dependent reorg? If so
you need to call compute_bb_for_insn before calling schedule_insns.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39274
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/39274] internal compiler error: in check_cfg, at haifa-sched.c, var-tracking
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
2 siblings, 0 replies; 4+ messages in thread
From: sergei_lus at yahoo dot com @ 2009-02-25 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sergei_lus at yahoo dot com 2009-02-25 17:00 -------
Thank you for the suggestion, but...
I use schedule_ebbs in machine dependent reorg, and I do call
compute_bb_for_insn before it. CFG is messed up before I get there...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39274
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/39274] internal compiler error: in check_cfg, at haifa-sched.c, var-tracking
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
2 siblings, 0 replies; 4+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-07-21 9:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2010-07-21 09:58 -------
Look at the ia64 port (and a few others too, e.g. blackfin), they call
compute_bb_for_insn first thing in machine reorg and that works. It is
obviously not ideal, but the only pass between free_cfg and machine_reorg that
can destroy the CFG is dbr_sched (delay branch scheduling).
Anyway, out-of-tree port => INVALID.
Feel free to re-open this bug report if you can reproduce it with an in-tree
port, of course.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
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).