This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR64277
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Jan 2015 10:25:48 +0100 (CET)
- Subject: [PATCH] Fix PR64277
- Authentication-results: sourceware.org; auth=none
This disables array-bound warnings from VRP2 as discussed.
Bootstrapped and tested on x86_64-unknown-linux-gnu - ok for trunk?
I'll search for duplicates and add a few testcases.
Thanks,
Richard.
2015-01-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/64277
* tree-vrp.c (vrp_finalize): Emit array-bound warnings only
from the first VRP pass.
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c (revision 220107)
+++ gcc/tree-vrp.c (working copy)
@@ -10229,7 +10197,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