This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/5250: ICE in print_rtl_and_abort, at flow.c:6458 with -O3
- From: Gwenole Beauchesne <gbeauchesne at mandrakesoft dot com>
- To: dmuell at gmx dot net, gerold dot jury at utanet dot at, joel at gcc dot gnu dot org, maciej at imsa dot edu, utx at penguin dot cz, relf at os2 dot ru, snowwolf at one2one-networks dot com, gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, nottelm at uni-muenster dot de
- Date: Fri, 08 Feb 2002 23:09:39 +0100
- Subject: Re: c/5250: ICE in print_rtl_and_abort, at flow.c:6458 with -O3
Hi,
PR c/4257, PR c/5409, PR c/5250 appear to have been fixed in gcc-3.1
when Jan Hubicka killed jump_optimize:
<http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01430.html> .
I don't know if I get it right but the following patch attempts to
disable the NOOP_MOVES jump_optimization prior to register renaming.
2002-02-08 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
PR c/4257, PR c/5049, PR c/5250
* toplev.c (rest_of_compilation): Don't perform NOOP_MOVES
jump_optimization prior to register renaming. However, tidy the
CFG by deleting unreachable code.
* gcc.c-torture/compile/20020208-1.c: New test.
---
gcc-3.0.4/gcc/testsuite/gcc.c-torture/compile/20020208-1.c.no-noop_moves
Fri Feb 8 20:28:37 2002
+++ gcc-3.0.4/gcc/testsuite/gcc.c-torture/compile/20020208-1.c Fri
Feb 8 20:28:37 2002
@@ -0,0 +1,11 @@
+/* Origin: PR c/4257 from Volker Reichelt <reichelt@igpm.rwth-aachen.de>.
*/
+/* This testcase caused gcc-3.0.1 to ICE if compiled with -O1
+ -frename-registers. */
+
+void f ()
+{
+ unsigned int *p;
+ p++;
+ *p += *p / (*p < 2);
+}
+
--- gcc-3.0.4/gcc/toplev.c.no-noop_moves Fri Feb 8 20:01:51 2002
+++ gcc-3.0.4/gcc/toplev.c Fri Feb 8 20:01:51 2002
@@ -3546,9 +3546,8 @@
timevar_push (TV_FLOW2);
open_dump_file (DFI_flow2, decl);
- jump_optimize (insns, !JUMP_CROSS_JUMP,
- JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
+ cleanup_cfg ();
/* On some machines, the prologue and epilogue code, or parts thereof,
can be represented as RTL. Doing so lets us schedule insns between
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5250