* builtins.c (c_strlen): Make only_value == 2 really only
affect warning generation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212514
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-07-14 Richard Biener <rguenther@suse.de>
+
+ * builtins.c (c_strlen): Make only_value == 2 really only
+ affect warning generation.
+
2014-07-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/61757
/* If the offset is known to be out of bounds, warn, and call strlen at
runtime. */
- if (only_value != 2
- && (offset < 0 || offset > max))
+ if (offset < 0 || offset > max)
{
/* Suppress multiple warnings for propagated constant strings. */
- if (! TREE_NO_WARNING (src))
+ if (only_value != 2
+ && !TREE_NO_WARNING (src))
{
warning_at (loc, 0, "offset outside bounds of constant string");
TREE_NO_WARNING (src) = 1;