+2019-01-03 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/88659
+ * calls.c (maybe_warn_nonstring_arg): Avoid assuming maxlen is set.
+
2019-01-03 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_block_move): Don't use
(maybe_set_strlen_range): Parts refactored into set_strlen_range.
Call set_strlen_range.
* tree-ssa-strlen.h (set_strlen_range): Add prototype.
-
+
PR middle-end/88663
* gimple-fold.c (get_range_strlen): Update prototype to no longer
need the flexp argument.
from get_range_strlen.
* gimple-ssa-sprintf.c (get_string_length): Update for the new
get_range_strlen API.
-
+
2019-01-02 Jan Hubicka <hubicka@ucw.cz>
PR lto/88130
+2019-01-03 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/88659
+ * gcc.dg/Wstringop-truncation-6.c: New test.
+
2019-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48543
--- /dev/null
+/* PR tree-optimization/88659 - ICE in maybe_warn_nonstring_arg
+ { dg-do compile }
+ { dg-options "-O0 -Wall" } */
+
+const char a[5] = "1234";
+
+int cst_idx_cst_bnd (void)
+{
+ return __builtin_strnlen (&a[1], 0);
+}
+
+int var_idx_cst_bnd (void)
+{
+ int i = 1;
+ return __builtin_strnlen (&a[i], 0);
+}
+
+int phi_idx_cst_bnd (int i)
+{
+ return __builtin_strnlen (&a[i ? 1 : 2], 0);
+}
+
+int unk_idx_cst_bnd (int i)
+{
+ return __builtin_strnlen (&a[i], 0);
+}
+
+int cst_idx_var_bnd (void)
+{
+ int n = 0;
+ return __builtin_strnlen (&a[1], n);
+}
+
+int cst_idx_phi_bnd (int n)
+{
+ return __builtin_strnlen (&a[1], n ? 1 : 2);
+}
+
+int cst_idx_unk_bnd (int n)
+{
+ return __builtin_strnlen (&a[1], n);
+}