aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/trunctfdf.c
new file mode 100644
index 000000000..29d6ed0dc
--- /dev/null
+++ b/gcc-4.9/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;
+}