This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug optimization/11631] [3.4/3.3-hammer regression] zsh/kernel miscompilation
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: zlomek at gcc dot gnu dot org <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Jul 2003 20:49:20 +0200
- Subject: Re: [Bug optimization/11631] [3.4/3.3-hammer regression] zsh/kernel miscompilation
- References: <20030722141202.11631.gbeauchesne@mandrakesoft.com> <20030724161423.26078.qmail@sources.redhat.com>
The problem is with the infinite loop. I am not really sure where
things get wrong (it happens inside lcm.c, which I take as a blackbox),
but this patch fixes it. I will commit it as obvious unless it breaks
something else.
Zdenek
Changelog:
* gcse.c (store_motion): Connect infinite loops to exit.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.222.2.11
diff -c -3 -p -r1.222.2.11 gcse.c
*** gcse.c 25 Jun 2003 20:22:48 -0000 1.222.2.11
--- gcse.c 24 Jul 2003 18:44:54 -0000
*************** store_motion ()
*** 7681,7686 ****
--- 7681,7687 ----
/* Now compute kill & transp vectors. */
build_store_vectors ();
add_noreturn_fake_exit_edges ();
+ connect_infinite_loops_to_exit ();
edge_list = pre_edge_rev_lcm (gcse_file, num_stores, transp, ae_gen,
st_antloc, ae_kill, &pre_insert_map,