summaryrefslogtreecommitdiff
path: root/libmudflap
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-01 12:27:33 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-01 12:27:33 +0000
commit9df58cd1a4883a91fee3ca92ef91cc4afb645bcf (patch)
tree1817c538d837f3cc63a2849dd1c687fef88ed18d /libmudflap
parentfa9b8d646ed10fb34b5d389ba472cb89eb1e2abe (diff)
downloadgcc-9df58cd1a4883a91fee3ca92ef91cc4afb645bcf.tar.gz
2009-07-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831 * tree-ssa-dce.c (propagate_necessity): Calls to functions that only act as barriers do not make any previous stores necessary. * tree-ssa-structalias.c (handle_lhs_call): Delay making HEAP variables global, do not add a constraint from nonlocal. (find_func_aliases): Handle escapes through return statements. (compute_points_to_sets): Make escaped HEAP variables global. * gcc.dg/tree-ssa/20041122-1.c: Enable TBAA, scan FRE dump, make allocated memory escape. Un-XFAIL. * gcc.dg/vect/pr21591.c: Make allocated memory escape. * gcc.dg/vect/pr31699.c: Likewise. * gcc.dg/tree-ssa/ssa-dce-7.c: New testcase. libmudflap/ * testsuite/libmudflap.c/fail11-frag.c: Make allocated memory escape. * testsuite/libmudflap.c/fail12-frag.c: Likewise. * testsuite/libmudflap.c/fail16-frag.c: Likewise. * testsuite/libmudflap.c/fail31-frag.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149140 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap')
-rw-r--r--libmudflap/ChangeLog9
-rw-r--r--libmudflap/testsuite/libmudflap.c/fail11-frag.c3
-rw-r--r--libmudflap/testsuite/libmudflap.c/fail12-frag.c3
-rw-r--r--libmudflap/testsuite/libmudflap.c/fail16-frag.c3
-rw-r--r--libmudflap/testsuite/libmudflap.c/fail31-frag.c3
5 files changed, 17 insertions, 4 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index 11d6f525f40..75031657d06 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,12 @@
+2009-07-01 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/19831
+ * testsuite/libmudflap.c/fail11-frag.c: Make allocated memory
+ escape.
+ * testsuite/libmudflap.c/fail12-frag.c: Likewise.
+ * testsuite/libmudflap.c/fail16-frag.c: Likewise.
+ * testsuite/libmudflap.c/fail31-frag.c: Likewise.
+
2009-06-30 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libmudflap.exp (libmudflap-init): Don't add "."
diff --git a/libmudflap/testsuite/libmudflap.c/fail11-frag.c b/libmudflap/testsuite/libmudflap.c/fail11-frag.c
index 72038fdba30..ebd1db96717 100644
--- a/libmudflap/testsuite/libmudflap.c/fail11-frag.c
+++ b/libmudflap/testsuite/libmudflap.c/fail11-frag.c
@@ -1,11 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+char *y;
int main ()
{
int i = 10;
char *x = (char *) malloc (i * sizeof (char));
-
+y = x;
while (i--)
{
++x;
diff --git a/libmudflap/testsuite/libmudflap.c/fail12-frag.c b/libmudflap/testsuite/libmudflap.c/fail12-frag.c
index da8bfb7c046..46dbdb23642 100644
--- a/libmudflap/testsuite/libmudflap.c/fail12-frag.c
+++ b/libmudflap/testsuite/libmudflap.c/fail12-frag.c
@@ -1,11 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+int *y;
int main ()
{
int i = 10;
int *x = (int *) malloc (i * sizeof (int));
-
+y = x;
while (i--)
{
++x;
diff --git a/libmudflap/testsuite/libmudflap.c/fail16-frag.c b/libmudflap/testsuite/libmudflap.c/fail16-frag.c
index 317e2744731..6ac6187e2ad 100644
--- a/libmudflap/testsuite/libmudflap.c/fail16-frag.c
+++ b/libmudflap/testsuite/libmudflap.c/fail16-frag.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+void *p;
int main ()
{
struct base {
@@ -15,7 +16,7 @@ struct derived {
struct base *bp;
bp = (struct base *) malloc (sizeof (struct base));;
-
+p = bp;
bp->basic = 10;
((struct derived *)bp)->extra = 'x';
return 0;
diff --git a/libmudflap/testsuite/libmudflap.c/fail31-frag.c b/libmudflap/testsuite/libmudflap.c/fail31-frag.c
index b15056c970c..bd9a903ccfd 100644
--- a/libmudflap/testsuite/libmudflap.c/fail31-frag.c
+++ b/libmudflap/testsuite/libmudflap.c/fail31-frag.c
@@ -8,11 +8,12 @@ int main ()
int z = h (4, 10);
return 0;
}
-
+int *p;
int h (int i, int j)
{
int k[i];
k[j] = i;
+ p = k;
return j;
}