Commit c02d2d0a by Prathamesh Kulkarni Committed by Prathamesh Kulkarni

re PR tree-optimization/80613 (ICE in is_gimple_reg_type with -O2)

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.

testsuite/
	* gcc.dg/tree-ssa/pr79697.c (k): Remove.

From-SVN: r247635
parent 79bed25b
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
......
......@@ -16,18 +16,6 @@ void h(void)
__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" } } */
......@@ -782,9 +782,7 @@ propagate_necessity (bool aggressive)
&& 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment