aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRadovan Obradovic <robradovic@mips.com>2014-04-24 10:27:16 +0000
committerTom de Vries <vries@gcc.gnu.org>2014-04-24 10:27:16 +0000
commit60a9bb6172cb069b1ee00d9edd782d686845b50f (patch)
treefac82aee3b938952c54c2e4c701d55c26331074f /gcc
parent4f660b159f4a050bc631930d20643d5533541d46 (diff)
downloadgcc-60a9bb6172cb069b1ee00d9edd782d686845b50f.zip
gcc-60a9bb6172cb069b1ee00d9edd782d686845b50f.tar.gz
gcc-60a9bb6172cb069b1ee00d9edd782d686845b50f.tar.bz2
-fuse-caller-save - Add test-case
2014-04-24 Radovan Obradovic <robradovic@mips.com> Tom de Vries <tom@codesourcery.com> * gcc.dg/fuse-caller-save.c: New test. Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r209745
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/fuse-caller-save.c21
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f0770c1..ff27827 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-24 Radovan Obradovic <robradovic@mips.com>
+ Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/fuse-caller-save.c: New test.
+
2014-04-24 Joey Ye <joey.ye@arm.com>
* g++.dg/cpp0x/nsdmi-union5.C: Change to runtime test.
diff --git a/gcc/testsuite/gcc.dg/fuse-caller-save.c b/gcc/testsuite/gcc.dg/fuse-caller-save.c
new file mode 100644
index 0000000..561a66d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fuse-caller-save.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fuse-caller-save" } */
+/* Testing -fuse-caller-save optimization option. */
+
+static int __attribute__((noinline))
+bar (int x)
+{
+ return x + 3;
+}
+
+int __attribute__((noinline))
+foo (int y)
+{
+ return y + bar (y);
+}
+
+int
+main (void)
+{
+ return !(foo (5) == 13);
+}