This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/5830: The compiler crashes
- From: Gwenole Beauchesne <gbeauchesne at mandrakesoft dot com>
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, Manuel dot Serrano at inria dot fr, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Cc: jh at suse dot cz
- Date: Fri, 08 Mar 2002 19:29:30 +0100
- Subject: Re: c/5830: The compiler crashes
Hi,
It doesn't appear to be fixed on the gcc-3.0-branch. On gcc-3.1-branch,
that appears to have been fixed with Jan's crossjumping patch of 2001/07/16:
<http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01030.html>
On 3.0-branch, gcc ICEs with the testcase of that PR and -O2 level.
However, it doesn't ICE with -O2 and -fno-reorder-blocks.
With the following patch, derived from Jan's, 3.0-branch bootstrapped
and regtested OK. Note that if I make cleanup_cfg() after
reorder_basic_blocks() too, bootstrap fails. So I don't think that patch
is good enough.
2002-03-08 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
PR c/5830
* toplev.c (rest_of_compilation): Do cleanup_cfg before
bb-reorder. [From Jan Hubicka for gcc-3.1, 2001/07/16]
--- gcc-3.0.4/gcc/toplev.c.reorder-blocks Fri Mar 8 14:10:00 2002
+++ gcc-3.0.4/gcc/toplev.c Fri Mar 8 15:45:46 2002
@@ -3636,12 +3636,16 @@
= optimize > 0 && only_leaf_regs_used () && leaf_function_p ();
#endif
- if (optimize > 0 && flag_reorder_blocks)
+ if (optimize > 0)
{
timevar_push (TV_REORDER_BLOCKS);
open_dump_file (DFI_bbro, decl);
-
- reorder_basic_blocks ();
+
+ /* Last attempt to optimize CFG, as life analyzis possibly removed
+ some instructions. */
+ cleanup_cfg ();
+ if (flag_reorder_blocks)
+ reorder_basic_blocks ();
close_dump_file (DFI_bbro, print_rtl_with_bb, insns);
timevar_pop (TV_REORDER_BLOCKS);
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5830