[Bug tree-optimization/57200] [4.8/4.9 Regression] aggressive-loop-optimizations notes appear even when warning itself is suppressed

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 8 08:45:00 GMT 2013


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.



More information about the Gcc-bugs mailing list