aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.c-torture/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20000419-1.c22
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog
index 38acdbd..5ae5ae6 100644
--- a/gcc/testsuite/gcc.c-torture/ChangeLog
+++ b/gcc/testsuite/gcc.c-torture/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-19 Greg McGary <gkm@gnu.org>
+
+ * execute/20000419-1.c: New test for arg clobbering with
+ sibling-call optimizations.
+
Wed Apr 12 22:54:02 2000 Hans-Peter Nilsson <hp@axis.com>
* execute/20000412-6.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000419-1.c b/gcc/testsuite/gcc.c-torture/execute/20000419-1.c
new file mode 100644
index 0000000..6127d8b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20000419-1.c
@@ -0,0 +1,22 @@
+struct foo { int a, b, c; };
+
+void
+brother (int a, int b, int c)
+{
+ if (a)
+ abort ();
+}
+
+void
+sister (struct foo f, int b, int c)
+{
+ brother ((f.b == b), b, c);
+}
+
+int
+main ()
+{
+ struct foo f = { 7, 8, 9 };
+ sister (f, 1, 2);
+ exit (0);
+}