http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57200



--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-05-08 
08:44:56 UTC ---

(In reply to comment #1)

> This issue is easy, isn't it? Something like:

> 

> Index: tree-ssa-loop-niter.c

> ===================================================================

> --- tree-ssa-loop-niter.c    (revision 198676)

> +++ tree-ssa-loop-niter.c    (working copy)

> @@ -2553,10 +2553,11 @@ do_warn_aggressive_loop_optimizations (struct loop

>      return;

> 

>    gimple estmt = last_stmt (e->src);

> -  warning_at (gimple_location (stmt), OPT_Waggressive_loop_optimizations,

> -          "iteration %E invokes undefined behavior",

> -          double_int_to_tree (TREE_TYPE (loop->nb_iterations), i_bound));

> -  inform (gimple_location (estmt), "containing loop");

> +  if (warning_at (gimple_location (stmt), OPT_Waggressive_loop_optimizations,

> +          "iteration %E invokes undefined behavior",

> +          double_int_to_tree (TREE_TYPE (loop->nb_iterations),

> +                      i_bound)))

> +    inform (gimple_location (estmt), "containing loop");

>    loop->warned_aggressive_loop_optimizations = true;

>  }



Yes, approved.

Reply via email to