aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-05-08 09:09:52 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-05-08 09:09:52 +0000
commit44398cbede9597490250b2ed86c690f10eb41e4f (patch)
treecc576f3f96038bb962d2e062a5c0ce191bded4fe /gcc/tree-ssa-loop-niter.c
parent90c33752392fe78f1a3cee51a64838a5975263ed (diff)
downloadgcc-44398cbede9597490250b2ed86c690f10eb41e4f.zip
gcc-44398cbede9597490250b2ed86c690f10eb41e4f.tar.gz
gcc-44398cbede9597490250b2ed86c690f10eb41e4f.tar.bz2
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
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index bcd4317..090e114 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2553,10 +2553,11 @@ do_warn_aggressive_loop_optimizations (struct loop *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;
}