summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20040625-1.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-29 19:27:07 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-29 19:27:07 +0000
commitb58ac3f2ec3925c035ec1c904d64a5c7cb8f3145 (patch)
treee6d98ee2b5e7a183363c1d90876fddc8ca385777 /gcc/testsuite/gcc.dg/20040625-1.c
parent82f5ee132c82157465f042ee2ed5fea3642e2224 (diff)
downloadgcc-b58ac3f2ec3925c035ec1c904d64a5c7cb8f3145.tar.gz
PR target/16195
* config/rs6000/rs6000.c (rs6000_conditional_register_usage): Make r30 fixed if TARGET_TOC && TARGET_MINIMAL_TOC. (first_reg_to_save): Pretend call_used_regs[30] is 0 if TARGET_TOC && TARGET_MINIMAL_TOC. (rs6000_emit_prologue, rs6000_emit_epilogue): Likewise. * gcc.dg/20040625-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83872 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20040625-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20040625-1.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20040625-1.c b/gcc/testsuite/gcc.dg/20040625-1.c
new file mode 100644
index 00000000000..e05e87c9124
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20040625-1.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-options "-mminimal-toc" { target powerpc64-*-* powerpc-ibm-aix* } } */
+
+extern void abort (void);
+extern void exit (int);
+
+double __attribute__((noinline))
+foo (void)
+{
+ return 16441577472.0;
+}
+
+double __attribute__((noinline))
+bar (double x)
+{
+ return x;
+}
+
+int __attribute__((noinline))
+test (void)
+{
+ double x = foo ();
+ x = bar (x);
+ x /= 1024 * 1024 * 1024;
+ x *= 70;
+ x = x < 70 ? x : 70;
+ x += 30;
+ return x;
+}
+
+int main (void)
+{
+ if (test () != 100)
+ abort ();
+ exit (0);
+}