+2017-05-05 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR tree-optimization/80613
+ * tree-ssa-dce.c (propagate_necessity): Remove cases for
+ BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
+
2017-05-05 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
+2017-05-05 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR tree-optimization/80613
+ * gcc.dg/tree-ssa/pr79697.c (k): Remove.
+
2017-05-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71577
__builtin_realloc (0, 10);
}
-void k(void)
-{
- char *p = __builtin_strdup ("abc");
- __builtin_free (p);
-
- char *q = __builtin_strndup ("abc", 3);
- __builtin_free (q);
-}
-
/* { dg-final { scan-tree-dump "Deleting : __builtin_strdup" "cddce1" } } */
/* { dg-final { scan-tree-dump "Deleting : __builtin_strndup" "cddce1" } } */
/* { dg-final { scan-tree-dump "__builtin_malloc" "gimple" } } */
-/* { dg-final { scan-tree-dump-not "__builtin_strdup" "optimized" } } */
-/* { dg-final { scan-tree-dump-not "__builtin_strndup" "optimized" } } */
-/* { dg-final { scan-tree-dump-not "__builtin_free" "optimized" } } */
&& DECL_BUILT_IN_CLASS (def_callee) == BUILT_IN_NORMAL
&& (DECL_FUNCTION_CODE (def_callee) == BUILT_IN_ALIGNED_ALLOC
|| DECL_FUNCTION_CODE (def_callee) == BUILT_IN_MALLOC
- || DECL_FUNCTION_CODE (def_callee) == BUILT_IN_CALLOC
- || DECL_FUNCTION_CODE (def_callee) == BUILT_IN_STRDUP
- || DECL_FUNCTION_CODE (def_callee) == BUILT_IN_STRNDUP))
+ || DECL_FUNCTION_CODE (def_callee) == BUILT_IN_CALLOC))
{
gimple *bounds_def_stmt;
tree bounds;