diff options
author | David S. Miller <davem@redhat.com> | 2002-09-26 03:16:44 -0700 |
---|---|---|
committer | David S. Miller <davem@gcc.gnu.org> | 2002-09-26 03:16:44 -0700 |
commit | 065fa8a1362ef88c552b4ad421e599b6ddacdd54 (patch) | |
tree | 4eff5d8b7d24b31807d5473446897aeec3dc09e2 /gcc/testsuite | |
parent | 1c88948f1b1ebba802ba0c2bce77034868299478 (diff) | |
download | gcc-065fa8a1362ef88c552b4ad421e599b6ddacdd54.zip gcc-065fa8a1362ef88c552b4ad421e599b6ddacdd54.tar.gz gcc-065fa8a1362ef88c552b4ad421e599b6ddacdd54.tar.bz2 |
re PR target/7842 ([REGRESSION] sparc code gen bug)
2002-09-25 David S. Miller <davem@redhat.com>
PR target/7842
* gcc.c-torture/execute/shiftdi.c: New test.
From-SVN: r57533
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/shiftdi.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8be94f02..8d5d331 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-09-25 David S. Miller <davem@redhat.com> + + PR target/7842 + * gcc.c-torture/execute/shiftdi.c: New test. + 2002-09-26 Richard Earnshaw <rearnsha@arm.com> * lib/gcc.exp (gcc_init): Use a filename for the testglue that is 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 0000000..44f0dfc --- /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; +} + + + |