This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[graphite] Fix PR39308
- From: Sebastian Pop <sebpop at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Guenther <rguenther at suse dot de>
- Date: Thu, 26 Feb 2009 15:38:56 -0600
- Subject: [graphite] Fix PR39308
Hi,
The attached patch fixes a rather annoying problem that shows
up only on gcc configured without checking: we initialize the
number of iterations in a gcc_assert. The patch passed bootstrap
and test on amd64-linux. Okay for trunk?
Thanks,
Sebastian Pop
--
AMD - GNU Tools
* graphite.c (graphite_loop_normal_form): Do not call
number_of_iterations_exit from a gcc_assert.
Index: graphite.c
===================================================================
--- graphite.c (revision 144404)
+++ graphite.c (working copy)
@@ -2382,8 +2382,10 @@ graphite_loop_normal_form (loop_p loop)
tree nit;
gimple_seq stmts;
edge exit = single_dom_exit (loop);
+ bool known_niter = number_of_iterations_exit (loop, exit, &niter, false);
+
+ gcc_assert (known_niter);
- gcc_assert (number_of_iterations_exit (loop, exit, &niter, false));
nit = force_gimple_operand (unshare_expr (niter.niter), &stmts, true,
NULL_TREE);
if (stmts)