Commit 44398cbe by Paolo Carlini Committed by Paolo Carlini

re PR tree-optimization/57200 (aggressive-loop-optimizations notes appear even…

re PR tree-optimization/57200 (aggressive-loop-optimizations notes appear even when warning itself is suppressed)

2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR tree-optimization/57200
	* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
	Only call inform if the preceding warning_at returns true.

From-SVN: r198704
parent 90c33752
2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
PR tree-optimization/57200
* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
Only call inform if the preceding warning_at returns true.
2013-05-07 Han Shen <shenhan@google.com> 2013-05-07 Han Shen <shenhan@google.com>
* cfgexpand.c (record_or_union_type_has_array_p): New function. * cfgexpand.c (record_or_union_type_has_array_p): New function.
......
...@@ -2553,10 +2553,11 @@ do_warn_aggressive_loop_optimizations (struct loop *loop, ...@@ -2553,10 +2553,11 @@ do_warn_aggressive_loop_optimizations (struct loop *loop,
return; return;
gimple estmt = last_stmt (e->src); gimple estmt = last_stmt (e->src);
warning_at (gimple_location (stmt), OPT_Waggressive_loop_optimizations, if (warning_at (gimple_location (stmt), OPT_Waggressive_loop_optimizations,
"iteration %E invokes undefined behavior", "iteration %E invokes undefined behavior",
double_int_to_tree (TREE_TYPE (loop->nb_iterations), i_bound)); double_int_to_tree (TREE_TYPE (loop->nb_iterations),
inform (gimple_location (estmt), "containing loop"); i_bound)))
inform (gimple_location (estmt), "containing loop");
loop->warned_aggressive_loop_optimizations = true; loop->warned_aggressive_loop_optimizations = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment