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/gcc.dg/torture/pr32897.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr32897.c (limited to 'gcc/testsuite/gcc.dg/torture/pr32897.c') diff --git a/gcc/testsuite/gcc.dg/torture/pr32897.c b/gcc/testsuite/gcc.dg/torture/pr32897.c new file mode 100644 index 000000000..3dc43ece0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr32897.c @@ -0,0 +1,27 @@ +/* { dg-options "-G0" { target mips*-*-* } } */ + +volatile int g[32]; +long long gll; +double gd; + +#define MULTI(X) \ + X( 1), X( 2), X( 3), X( 4), X( 5), X( 6), X( 7), X( 8), X( 9), X(10), \ + X(11), X(12), X(13), X(14), X(15), X(16), X(17), X(18), X(19), X(20), \ + X(21), X(22), X(23), X(24), X(25), X(26), X(27), X(28), X(29), X(30) + +#define DECLARE(INDEX) x##INDEX +#define COPY_IN(INDEX) x##INDEX = g[INDEX] +#define COPY_OUT(INDEX) g[INDEX] = x##INDEX + +void +test (int n) +{ + union { long long l; double d; } u = { 0x12345678 }; + gll = u.l; + int MULTI (DECLARE); + MULTI (COPY_IN); + MULTI (COPY_OUT); + MULTI (COPY_OUT); + MULTI (COPY_OUT); + gd = u.d; +} -- cgit v1.2.3