This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]