This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR64277


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]