diff options
author | Greg McGary <gkm@gnu.org> | 2000-04-19 08:32:43 +0000 |
---|---|---|
committer | Greg McGary <gkm@gcc.gnu.org> | 2000-04-19 08:32:43 +0000 |
commit | 21c076f989c6b8a06440077528944c61d3eccad0 (patch) | |
tree | 5156c63d282c8617d171ac1ae197086620526fd7 /gcc | |
parent | 0a3fcd9a90fdf9e0eca2d9d940ff9da2f150a057 (diff) | |
download | gcc-21c076f989c6b8a06440077528944c61d3eccad0.zip gcc-21c076f989c6b8a06440077528944c61d3eccad0.tar.gz gcc-21c076f989c6b8a06440077528944c61d3eccad0.tar.bz2 |
20000419-1.c: New test for arg clobbering with sibling-call optimizations.
* execute/20000419-1.c: New test for arg clobbering with
sibling-call optimizations.
From-SVN: r33249
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20000419-1.c | 22 |
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); +} |