c/5830: The compiler crashes
Gwenole Beauchesne
gbeauchesne@mandrakesoft.com
Fri Mar 8 10:36:00 GMT 2002
The following reply was made to PR c/5830; it has been noted by GNATS.
From: Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, Manuel.Serrano@inria.fr,
gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc: jh@suse.cz
Subject: Re: c/5830: The compiler crashes
Date: Fri, 08 Mar 2002 19:29:30 +0100
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
More information about the Gcc-prs
mailing list