re PR tree-optimization/80613 (ICE in is_gimple_reg_type with -O2)
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Fri, 5 May 2017 13:21:28 +0000 (13:21 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Fri, 5 May 2017 13:21:28 +0000 (13:21 +0000)
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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr79697.c
gcc/tree-ssa-dce.c

index 7bc32a9cb5a219eacf0a2502449a20f34846de2b..5aa46fc0fd198ebfd953f4c7fe78ce97110f608b 100644 (file)
@@ -1,3 +1,9 @@
+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.
index f9ac3346a7a147d1d11c3762dfcacf62a40251ab..a3012e82f3c0d20b3d1ef801a8b7db591e76784c 100644 (file)
@@ -1,3 +1,8 @@
+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
index d4f647397876d86a9389124dadcd1678ca8602a2..fc3580e3ce34d867488470e25ac4efdc3578fee2 100644 (file)
@@ -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" } } */
index e17659df91fcee0f34a91b0c2953f75db3ad3762..4225c3cc1a11d9e954fe29cb55449a5f8cdab127 100644 (file)
@@ -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;