summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c20
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ad748bcee66..82a596b454a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2004-05-17 Steven Bosscher <stevenb@suse.de>
+
+ * gcc.dg/tree-ssa/20040517-1.c: New test.
+
2004-05-15 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/tree-ssa/20040514-1.c: Add '}' that was forgotten.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
new file mode 100644
index 00000000000..c38f1b360f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-ssa-vops" } */
+int a;
+
+extern void __attribute__ ((malloc)) *foo ();
+
+void bar (void)
+{
+ a = 1;
+ foo ();
+ if (a)
+ abort ();
+}
+
+/* We used to treat malloc functions like pure and const functions, but
+ malloc functions may clobber global memory. Only the function result
+ does not alias any other pointer.
+ Hence, we must have a VDEF for a before and after the call to foo(). */
+/* { dg-final { scan-tree-dump-times "VDEF" 2 "ssa"} } */
+
OpenPOWER on IntegriCloud