diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-27 17:31:34 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-27 17:31:34 +0000 |
commit | 72c59a18cc11b00528f439ea717715b9baddad9d (patch) | |
tree | e09e3c8bc4a42746c82cfe49a69a4098a8e6622b /gcc/fold-const.c | |
parent | 06c4be77f669f874fdea3a0576d675cf0fac315a (diff) | |
download | gcc-72c59a18cc11b00528f439ea717715b9baddad9d.tar.gz |
./:
PR tree-optimization/33565
* tree-ssa-loop-ch.c (copy_loop_headers): Set TREE_NO_WARNING on
assignments of comparisons.
* tree-ssa-sccvn.c (simplify_binary_expression): Add stmt
parameter. Change caller. Defer overflow warnings around call to
fold_binary.
* fold-const.c (fold_undefer_overflow_warnings): Don't warn if
TREE_NO_WARNING is set on the statement.
* tree-ssa-forwprop.c
(tree_ssa_forward_propagate_single_use_vars): Don't test
TREE_NO_WARNING when calling fold_undefer_overflow_warnings.
* tree-cfg.c (fold_cond_expr_cond): Likewise.
testsuite/:
PR tree-optimization/33565
* gcc.dg/Wstrict-overflow-20.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128840 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 12413d833d0..62cbfd11ee0 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -974,6 +974,9 @@ fold_undefer_overflow_warnings (bool issue, const_tree stmt, int code) if (!issue || warnmsg == NULL) return; + if (stmt != NULL_TREE && TREE_NO_WARNING (stmt)) + return; + /* Use the smallest code level when deciding to issue the warning. */ if (code == 0 || code > (int) fold_deferred_overflow_code) |