From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/g++.dg/compat/decimal/return_y.h | 67 ++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 gcc/testsuite/g++.dg/compat/decimal/return_y.h (limited to 'gcc/testsuite/g++.dg/compat/decimal/return_y.h') diff --git a/gcc/testsuite/g++.dg/compat/decimal/return_y.h b/gcc/testsuite/g++.dg/compat/decimal/return_y.h new file mode 100644 index 000000000..285526e2e --- /dev/null +++ b/gcc/testsuite/g++.dg/compat/decimal/return_y.h @@ -0,0 +1,67 @@ +#include + +#include "compat-common.h" + +#define T(NAME, TYPE, INITVAL) \ +extern TYPE g01##NAME, g02##NAME, g03##NAME, g04##NAME; \ +extern TYPE g05##NAME, g06##NAME, g07##NAME, g08##NAME; \ +extern TYPE g09##NAME, g10##NAME, g11##NAME, g12##NAME; \ +extern TYPE g13##NAME, g14##NAME, g15##NAME, g16##NAME; \ + \ +extern void check##NAME (TYPE x, TYPE v); \ + \ +extern void \ +init##NAME (TYPE *p, TYPE v) \ +{ \ + *p = v + INITVAL; \ +} \ + \ +extern void \ +checkg##NAME (void) \ +{ \ + check##NAME (g01##NAME, 1+INITVAL); \ + check##NAME (g02##NAME, 2+INITVAL); \ + check##NAME (g03##NAME, 3+INITVAL); \ + check##NAME (g04##NAME, 4+INITVAL); \ + check##NAME (g05##NAME, 5+INITVAL); \ + check##NAME (g06##NAME, 6+INITVAL); \ + check##NAME (g07##NAME, 7+INITVAL); \ + check##NAME (g08##NAME, 8+INITVAL); \ + check##NAME (g09##NAME, 9+INITVAL); \ + check##NAME (g10##NAME, 10+INITVAL); \ + check##NAME (g11##NAME, 11+INITVAL); \ + check##NAME (g12##NAME, 12+INITVAL); \ + check##NAME (g13##NAME, 13+INITVAL); \ + check##NAME (g14##NAME, 14+INITVAL); \ + check##NAME (g15##NAME, 15+INITVAL); \ + check##NAME (g16##NAME, 16+INITVAL); \ +} \ + \ +extern TYPE \ +test0##NAME (void) \ +{ \ + return g01##NAME; \ +} \ + \ +extern TYPE \ +test1##NAME (TYPE x01) \ +{ \ + return x01; \ +} \ + \ +extern TYPE \ +testva##NAME (int n, ...) \ +{ \ + int i; \ + TYPE rslt; \ + va_list ap; \ + va_start (ap, n); \ + for (i = 0; i < n; i++) \ + rslt = va_arg (ap, TYPE); \ + va_end (ap); \ + return rslt; \ +} + +T(d32, dec32, (dec32)1.5) +T(d64, dec64, (dec64)2.5) +T(d128, dec128, (dec128)3.5) -- cgit v1.2.3