diff options
author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-07 23:52:37 +0000 |
---|---|---|
committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-07 23:52:37 +0000 |
commit | 6c47e47db58a72fa83ef6628e00b0ef520d5bb6e (patch) | |
tree | c0cfce55af07acbfb42d18f9f151fc9d70659377 /libgfortran/intrinsics/mvbits.c | |
parent | 0fbca5e8cd4eadce5a4b2855cdc7ac69b806a0e0 (diff) | |
download | gcc-6c47e47db58a72fa83ef6628e00b0ef520d5bb6e.tar.gz |
libgfortran/
2006-02-07 Dale Ranta <dir@lanl.gov>
PR fortran/25577
* intrinsics/mvbits.c: Shift '(TYPE)1' type when building 'lenmask'.
testsuite/
2006-02-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/25577
* gfortran.dg/mvbits_1.f90: New.
Also fixed Dirk Mueller's preceding ChangeLog entry.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110728 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics/mvbits.c')
-rw-r--r-- | libgfortran/intrinsics/mvbits.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/intrinsics/mvbits.c b/libgfortran/intrinsics/mvbits.c index 6bfb5cad85b..a452fc98b3f 100644 --- a/libgfortran/intrinsics/mvbits.c +++ b/libgfortran/intrinsics/mvbits.c @@ -1,5 +1,5 @@ /* Implementation of the MVBITS intrinsic - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. Contributed by Tobias Schlüter This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -48,7 +48,7 @@ SUB_NAME (const TYPE *from, const GFC_INTEGER_4 *frompos, { TYPE oldbits, newbits, lenmask; - lenmask = (*len == sizeof (TYPE)*8) ? ~(TYPE)0 : (1 << *len) - 1; + lenmask = (*len == sizeof (TYPE)*8) ? ~(TYPE)0 : ((TYPE)1 << *len) - 1; newbits = (((UTYPE)(*from) >> *frompos) & lenmask) << *topos; oldbits = *to & (~(lenmask << *topos)); |