diff options
author | Richard Biener <rguenther@suse.de> | 2015-01-27 09:49:29 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-01-27 09:49:29 +0000 |
commit | f101c4b47a98c98238bbf31a7ee79b1b2e4cce7b (patch) | |
tree | b08aee2370e01b303f880ce9649c1c711e51fa36 /gcc/tree-vrp.c | |
parent | 4eaf52aabba9299e6642ac1e88de0b56f0a81908 (diff) | |
download | gcc-f101c4b47a98c98238bbf31a7ee79b1b2e4cce7b.zip gcc-f101c4b47a98c98238bbf31a7ee79b1b2e4cce7b.tar.gz gcc-f101c4b47a98c98238bbf31a7ee79b1b2e4cce7b.tar.bz2 |
re PR tree-optimization/56273 (Bogus -Warray-bounds warning)
2015-01-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/56273
PR tree-optimization/59124
PR tree-optimization/64277
* tree-vrp.c (vrp_finalize): Emit array-bound warnings only
from the first VRP pass.
* g++.dg/warn/Warray-bounds-6.C: New testcase.
* gcc.dg/Warray-bounds-12.c: Likewise.
* gcc.dg/Warray-bounds-13.c: Likewise.
From-SVN: r220157
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index acf6b20..c5ca287 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -10229,7 +10229,7 @@ vrp_finalize (void) substitute_and_fold (op_with_constant_singleton_value_range, vrp_fold_stmt, false); - if (warn_array_bounds) + if (warn_array_bounds && first_pass_instance) check_all_array_refs (); /* We must identify jump threading opportunities before we release |