From 6b1ef791cc2c473cf615817d194537ed95f13f6d Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 26 Sep 2002 21:14:12 -0700 Subject: [PATCH] trunctfdf.c: New. 2002-09-26 David S. Miller * gcc.c-torture/compile/trunctfdf.c: New. From-SVN: r57577 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/compile/trunctfdf.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/trunctfdf.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 733786564d93..d211f1b0f374 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-09-26 David S. Miller + + * gcc.c-torture/compile/trunctfdf.c: New. + 2002-09-26 Kaveh R. Ghazi * lib/target-supports.exp (check_weak_available): Handle solaris2. diff --git a/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c b/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c new file mode 100644 index 000000000000..29d6ed0dc9a9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c @@ -0,0 +1,14 @@ +/* Sparc w/128-bit long double bombed on this because even though + the trunctfdf libcall passed the long double by reference, the + libcall was still marked as LCT_CONST instead of LCT_PURE. */ + +double *copy(long double *first, long double *last, double *result) +{ + int n; + for (n = last - first; n > 0; --n) { + *result = *first; + ++first; + ++result; + } + return result; +}