This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: howto debug ICE? [was: Re: boostrap failure (ICE) on gcc-3_3-branch (todays sources)]
- From: Jan Hubicka <jh at suse dot cz>
- To: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Cc: Karel Gardas <kgardas at objectsecurity dot com>,GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Fri, 21 Feb 2003 22:50:20 +0100
- Subject: Re: howto debug ICE? [was: Re: boostrap failure (ICE) on gcc-3_3-branch (todays sources)]
- References: <3E566472.2030003@pop.agri.ch> <Pine.LNX.4.43.0302212224030.1096-100000@thinkpad.c0202001.roe.itnq.net> <20030221213636.GE5340@kam.mff.cuni.cz>
> > On Fri, 21 Feb 2003, Andreas Tobler wrote:
> >
> > > Karel Gardas wrote:
> > > > Hello,
> > > >
> > > > I'm just curious if this is a bug on my side or something is broken in
> > > > gcc. I've updated to todays sources of gcc-3_3-branch. Configure them
> > > > with:
> > >
> > > I see the same on darwin6.3 with todays 3.3 tree.
> >
> > Good that I'm not alone. I've just updated sources and the crash is still
> > here. I've though that it might be usefull to post backtrace of this
> > crash, but gcc leave me w/o it since it just seems to finished with exit
> > code 01.
>
> I am just looking into this patch. It looks like latent bug somewhere
> in fund_many_sub_basic_blocks uncovered by my patch. Hope to have it
> fixed soon.
Hi,
the problem is that find_many_sub_basic_block crash when there are not
blocks to split. It is probably better to avoid calling it with empty
bitmap than change the behaviour. I've also noticed that
commit_edge_insertions_watch_calls needs to be brought into the sync.
I've bootstrapped it with i686 and tested that it does fix the testcase
I have.
I am installing it as obvious into 3.3 branch and testing similar patch
into mainline.
Fri Feb 21 22:45:35 CET 2003 Jan Hubicka <jh at suse dot cz>
* cfgrtl.c (commit_edge_insertions): Call
find_many_sub_basic_block only when some code has been emitted.
(commit_edge_insertions_watch_calls): Bring into sync with
commit_edge_insertions
Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.61.2.1
diff -c -3 -p -r1.61.2.1 cfgrtl.c
*** cfgrtl.c 21 Feb 2003 10:36:51 -0000 1.61.2.1
--- cfgrtl.c 21 Feb 2003 21:45:23 -0000
*************** commit_edge_insertions ()
*** 1459,1464 ****
--- 1459,1465 ----
{
basic_block bb;
sbitmap blocks;
+ bool changed = false;
#ifdef ENABLE_CHECKING
verify_flow_info ();
*************** commit_edge_insertions ()
*** 1472,1481 ****
{
next = e->succ_next;
if (e->insns)
! commit_one_edge_insertion (e, false);
}
}
blocks = sbitmap_alloc (last_basic_block);
sbitmap_zero (blocks);
FOR_EACH_BB (bb)
--- 1473,1488 ----
{
next = e->succ_next;
if (e->insns)
! {
! changed = true;
! commit_one_edge_insertion (e, false);
! }
}
}
+ if (!changed)
+ return;
+
blocks = sbitmap_alloc (last_basic_block);
sbitmap_zero (blocks);
FOR_EACH_BB (bb)
*************** void
*** 1495,1500 ****
--- 1502,1509 ----
commit_edge_insertions_watch_calls ()
{
basic_block bb;
+ sbitmap blocks;
+ bool changed = false;
#ifdef ENABLE_CHECKING
verify_flow_info ();
*************** commit_edge_insertions_watch_calls ()
*** 1508,1516 ****
{
next = e->succ_next;
if (e->insns)
! commit_one_edge_insertion (e, true);
}
}
}
/* Print out one basic block with live information at start and end. */
--- 1517,1542 ----
{
next = e->succ_next;
if (e->insns)
! {
! changed = true;
! commit_one_edge_insertion (e, true);
! }
}
}
+
+ if (!changed)
+ return;
+
+ blocks = sbitmap_alloc (last_basic_block);
+ sbitmap_zero (blocks);
+ FOR_EACH_BB (bb)
+ if (bb->aux)
+ {
+ SET_BIT (blocks, bb->index);
+ bb->aux = NULL;
+ }
+ find_many_sub_basic_blocks (blocks);
+ sbitmap_free (blocks);
}
/* Print out one basic block with live information at start and end. */