diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 19:27:07 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 19:27:07 +0000 |
commit | b58ac3f2ec3925c035ec1c904d64a5c7cb8f3145 (patch) | |
tree | e6d98ee2b5e7a183363c1d90876fddc8ca385777 /gcc/testsuite | |
parent | 82f5ee132c82157465f042ee2ed5fea3642e2224 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20040625-1.c | 37 |
2 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4589808a7d3..1239de739fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-06-29 Jakub Jelinek <jakub@redhat.com> + + PR target/16195 + * gcc.dg/20040625-1.c: New test. + 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> * gfortran.fortran-torture/execute/parameter_2.f90: New test. 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); +} |