+2018-06-11 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/86089
+ * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
+
2018-06-11 Julia Koval <julia.koval@intel.com>
* config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
+2018-06-11 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/86089
+ * gcc.dg/tree-ssa/pr86089.c: New test.
+
2018-06-11 Julia Koval <julia.koval@intel.com>
* gcc.target/i386/avx512fvl-vaes-1.c: Remove 128bit versions from test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+extern char* stpcpy (char*, const char*);
+
+int f (char* s)
+{
+ char a[32];
+
+ __builtin___strcpy_chk (a, s, __builtin_object_size (a, 1));
+
+ return __builtin_strlen (a);
+}
lhs = NULL_TREE;
/* FALLTHRU */
case BUILT_IN_STRCPY:
+ case BUILT_IN_STRCPY_CHK:
gcc_assert (builtin_decl_implicit_p (BUILT_IN_STPCPY));
- fn = builtin_decl_implicit (BUILT_IN_STPCPY);
+ if (gimple_call_num_args (stmt) == 2)
+ fn = builtin_decl_implicit (BUILT_IN_STPCPY);
+ else
+ fn = builtin_decl_explicit (BUILT_IN_STPCPY_CHK);
gcc_assert (lhs == NULL_TREE);
if (dump_file && (dump_flags & TDF_DETAILS) != 0)
{