From: No Author Date: Thu, 26 Sep 2002 10:19:11 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.2.1~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52d32645844621e80b2837420e795b3c2951f4f4;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_2-branch'. From-SVN: r57535 --- diff --git a/gcc/testsuite/gcc.c-torture/execute/shiftdi.c b/gcc/testsuite/gcc.c-torture/execute/shiftdi.c new file mode 100644 index 000000000000..44f0dfc2bced --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/shiftdi.c @@ -0,0 +1,20 @@ +/* Failed on sparc with -mv8plus because sparc.c:set_extends() thought + erroneously that SImode ASHIFT chops the upper bits, it does not. */ + +typedef unsigned long long uint64; + +void g(uint64 x, int y, int z, uint64 *p) +{ + unsigned w = ((x >> y) & 0xffffffffULL) << (z & 0x1f); + *p |= (w & 0xffffffffULL) << z; +} + +int main(void) +{ + uint64 a = 0; + g(0xdeadbeef01234567ULL, 0, 0, &a); + return (a == 0x01234567) ? 0 : 1; +} + + +