diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/trunctfdf.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/trunctfdf.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 000000000..29d6ed0dc --- /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; +} |