aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-09-08 09:21:39 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-09-08 09:21:39 +0000
commitc22c0db26ad16673415d7523781fcf80c8e545ba (patch)
treecacd1b123bb8053812cddbd152f5ddd2121054b5 /gcc/testsuite
parent88b7601303a76eae0d7b831014cba0ff96360e73 (diff)
downloadgcc-c22c0db26ad16673415d7523781fcf80c8e545ba.zip
gcc-c22c0db26ad16673415d7523781fcf80c8e545ba.tar.gz
gcc-c22c0db26ad16673415d7523781fcf80c8e545ba.tar.bz2
re PR tree-optimization/19831 (Missing DSE/malloc/free optimization)
2011-09-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/19831 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Do not mark allocation functions as necessary. * gcc.dg/tree-ssa/ssa-dce-8.c: New testcase. From-SVN: r178683
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-8.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 18b487d..b432683 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-08 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/19831
+ * gcc.dg/tree-ssa/ssa-dce-8.c: New testcase.
+
2011-09-08 Tobias Burnus <burnus@net-b.de>
PR fortran/44646
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-8.c
new file mode 100644
index 0000000..689eb99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-8.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int main()
+{
+ int *p = __builtin_malloc (4);
+ *p = 4;
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-not "malloc" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */